Guillaume Ayoub
a756ea121f
Merge branch 'master' of github.com:Kozea/WeasyPrint
2020-03-14 16:53:57 +01:00
Guillaume Ayoub
42d802da4f
Use high-level functions to create temprorary files
...
Using low-level functions forces us to handle low-level file descriptors and
encodings, while we could safely rely on Python for that.
Related to #1074 .
2020-03-14 16:51:41 +01:00
Guillaume Ayoub
a430b30322
Use filesystem encoding instead of ASCII for fonts config files
...
This is needed when temporary filenames are generated with non-ASCII
characters.
Close #1074 .
2020-03-14 16:50:01 +01:00
Guillaume Ayoub
2b7ec23c5e
Merge pull request #1072 from gentooboontoo/drop-extraneous-font-config
...
Drop extraneous font matching
2020-03-14 16:19:21 +01:00
Julien Sanchez
3a91c50636
Drop extraneous font matching
2020-02-26 11:56:13 +01:00
Guillaume Ayoub
a4511d0093
Fix comments and typos
2020-02-24 10:33:09 +01:00
Guillaume Ayoub
b40ad461be
Remove repeated copyright assignments in files
...
Everything is replaced by a more explicit message in the COPYRIGHT file.
Inspired by rust-lang/rust#43498 and rust-lang/rust#57108 .
2020-01-02 14:10:09 +01:00
Guillaume Ayoub
9831a1ba40
Remove and fix some TODOs
2019-07-11 16:48:53 +02:00
Guillaume Ayoub
b7a9fe7dcc
Update copyright
2019-03-04 11:04:06 +01:00
Guillaume Ayoub
bdd45475b6
Clean a lot of things in API documentation
2019-02-22 11:34:46 +01:00
Guillaume Ayoub
03f01e37ee
Update and add some docstrings
2019-02-21 17:34:56 +01:00
Guillaume Ayoub
74f56f7102
Add a --debug option and set debug level for prefixed CSS properties
2019-01-04 01:22:49 +01:00
Guillaume Ayoub
186c6550ed
Use filesystem encoding defined in url module for fonts
2018-10-26 19:09:43 +02:00
Guillaume Ayoub
56ec1cb9c2
Use pathlib to generate URI from filename
...
Also, always use the system's file encoding, as it's utf-8 on macOS and should
be OK on Unix for recent versions of Windows.
Related to #687 .
2018-10-26 18:58:21 +02:00
Guillaume Ayoub
56904baa79
Use the same copyright line everywhere
2018-09-20 18:46:27 +02:00
Tontyna
8624113e13
Improve fontconfig check
...
Emit warnings about font-less fontconfig on any OS.
Stick to native rendering on Windows and macOS if fontconfig has
neither fonts nor a config file.
2018-09-01 11:20:38 +02:00
Tontyna
66e5a3fc22
Prevent RuntimeError
2018-08-29 21:05:44 +02:00
Tontyna
402c87b034
no need to try/catch dlopen()
2018-05-01 11:04:31 +02:00
Guillaume Ayoub
ab62ae1d3c
Clean some comments and some code
2018-04-30 22:57:47 +02:00
Tontyna
2c2092d27b
Prevent Cairo crashing with font-size 0
2018-03-31 18:10:51 +02:00
Tontyna
dca4746935
Remove superfluous dlopen
2018-03-16 17:45:35 +01:00
Tontyna
23d7dac5b4
Restrict altered behavior to win. Dont annoy.
2018-03-16 00:33:31 +01:00
Tontyna
84ae39ead4
Enable font-family on Windows
...
When a working `libfontconfig` is detected on Windows, the font
rendering is done via FontConfig and FreeType instead of using the
native Win32 APIs.
2018-03-14 11:13:23 +01:00
Guillaume Ayoub
16e8186568
Drop Python 2 support
2018-01-14 01:48:17 +01:00
Guillaume Ayoub
209eaaac11
Don't call super's __del__
2017-10-04 18:25:04 +02:00
Guillaume Ayoub
f5367c8559
Use __del__ instead of explicit clean to clean font configurations
...
This avoids rendering problems when the @font-face font files were removed
before calling write_pdf, write_image_surface or write_png.
2017-10-04 14:29:38 +02:00
Guillaume Ayoub
fcd6bf7070
Clean and document the logging levels
...
Related to #488 .
2017-07-25 13:59:56 +02:00
Guillaume Ayoub
a9a99f69d7
Don't crash with @font-face{src: local()}
...
Fix #487 .
2017-07-20 17:07:00 +02:00
Tarashish Mishra
0fa6838c77
Let the logging module do the string interpolation
2017-03-28 13:02:50 +05:30
Guillaume Ayoub
c1accaa58e
Use warnings instead of logs to advertise about old libraries
2017-03-25 15:57:06 +01:00
Guillaume Ayoub
4f4b4ed598
Use isort in tests
2017-03-25 00:33:36 +01:00
Guillaume Ayoub
ae040e1c71
Respect flake8 everywhere
2017-03-25 00:24:27 +01:00
Guillaume Ayoub
210b73820d
Log to stderr only with CLI
...
Fix #412 .
2017-03-24 23:12:04 +01:00
Andreas Pflug
25fdc0e949
Warn broken cairo version
2017-02-06 16:57:54 +01:00
Guillaume Ayoub
bf6911d36f
Correctly close files open by mkstemp
...
Python's tempfile.mkstemp already opens files, we don't have to open
them twice. The documentation is not really clear about that but
there's a good post on Logilab's blog: https://www.logilab.org/17873
Fix #396 .
2016-12-07 18:25:58 +01:00
Guillaume Ayoub
292dc436d6
Merge pull request #393 from Kozea/osx-travis
...
Enable @font-face and add tests on MacOS
2016-11-21 20:16:43 +01:00
Guillaume Ayoub
c015d8dbc1
Fix again FcFontMatch's signature
...
Related to #391 .
2016-11-20 12:59:02 +01:00
Guillaume Ayoub
44d6d892aa
Use the real signature for FcFontMatch
...
Fix #391 .
2016-11-20 02:39:26 +01:00
Guillaume Ayoub
9977c9dad6
Let's try fontconfig on MacOS
2016-11-19 16:25:30 +01:00
Guillaume Ayoub
2a23bf99a3
Fix more and more memory leaks
2016-11-05 22:21:07 +01:00
Guillaume Ayoub
152193cf77
Add the font configuration in LayoutContext
...
The font configuration is available (almost) everywhere it's needed,
@font-face doesn't rely on a global state anymore.
2016-10-27 17:36:24 +02:00
Guillaume Ayoub
d7b89dbb68
Clean the font config after rendering the document
2016-10-27 11:41:34 +02:00
Guillaume Ayoub
db54e8e3ff
Don't rely on pango_fc_font_map_set_config yet
2016-10-26 18:29:40 +02:00
Guillaume Ayoub
489163e927
Clean FFI declarations and fix some memory leaks
2016-10-26 18:15:32 +02:00
Guillaume Ayoub
b5103d349f
Create a new font config for each document
2016-10-26 17:17:00 +02:00