1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00
Commit Graph

2318 Commits

Author SHA1 Message Date
Guillaume Ayoub
8f9e15a57e Handle image-rendering 2020-06-08 00:01:09 +02:00
Guillaume Ayoub
58016053a0 Handle solid gradients 2020-06-07 23:40:01 +02:00
Guillaume Ayoub
4f7522cb08 Fix image names for gradient tests 2020-06-07 23:38:12 +02:00
Guillaume Ayoub
c9ecb2366c Small fixes for images 2020-06-07 21:17:29 +02:00
Guillaume Ayoub
075bfad788 Fix some gradients tests 2020-06-07 20:54:40 +02:00
Guillaume Ayoub
a673ad113c Handle images less than 32×32 2020-06-07 17:05:36 +02:00
Lucie Anglade
2a1c33d0ba Filter depending image format 2020-06-07 16:12:47 +02:00
Lucie Anglade
2a4020f57c Use jpeg2000 to save pillow image when format is not jpeg 2020-06-07 16:04:25 +02:00
Guillaume Ayoub
57994a18b0 Fix document parameter in contexts 2020-06-07 15:38:16 +02:00
Guillaume Ayoub
c50e9aff11 Use dedicated resources for x-objects and patterns 2020-06-07 15:18:00 +02:00
Guillaume Ayoub
39580ec898 Remove useless imports 2020-06-07 11:41:31 +02:00
Guillaume Ayoub
d6cdb690a2 Handle multi-color gradients 2020-06-07 11:40:30 +02:00
Guillaume Ayoub
64e9d4c1c2 Handle gradients positions and repeats 2020-06-07 11:20:38 +02:00
Guillaume Ayoub
29365f3318 Re-enable user_to_device_distance 2020-06-07 11:04:12 +02:00
Guillaume Ayoub
0350a8c055 Handle very simple gradients 2020-06-07 00:32:47 +02:00
Guillaume Ayoub
9b1cd0e870 Merge branch 'pydyf' of gitlab.com:courtbouillon/weasyprint into pydyf 2020-06-06 11:17:11 +02:00
Guillaume Ayoub
b00346924b Don’t release memory allocated by ffi.new
These objects are owned by the Python object and are automatically released
when garbage-collected.
2020-06-04 01:27:38 +02:00
Lucie Anglade
f2a7614138 Rotate image 2020-06-03 19:47:34 +02:00
Lucie Anglade
86b32fa2c2 Different colorspace depending of image format 2020-06-03 19:46:58 +02:00
Lucie Anglade
7eff99018e Use unique image name 2020-06-03 18:01:25 +02:00
Lucie Anglade
f530502e05 Handle jpg images 2020-06-03 17:58:53 +02:00
Guillaume Ayoub
baa341ad28 Small optimizations in text rendering 2020-06-02 22:29:32 +02:00
Guillaume Ayoub
2aee94b411 Don’t set the whole text of the second line 2020-06-02 22:04:57 +02:00
Guillaume Ayoub
adceabb29d Fix index when splitting long texts 2020-06-02 21:56:03 +02:00
Guillaume Ayoub
d70e556c39 Improve memory allocation and fix or document memory leaks 2020-06-02 18:17:33 +02:00
Guillaume Ayoub
f1bf364c4e Don’t use iters to get layout lines
This commit removes code and improves speed 😎.
2020-06-02 17:59:17 +02:00
Guillaume Ayoub
e3f1a4ad0a Don’t use garbage collector in heavily used functions 2020-06-01 16:51:33 +02:00
Guillaume Ayoub
5b0c57dcb4 Merge lines between runs 2020-06-01 15:38:27 +02:00
Guillaume Ayoub
8e8aba0afa Compress streams 2020-06-01 11:48:17 +02:00
Guillaume Ayoub
603ee2659a Improve text rendering speed 2020-06-01 01:12:32 +02:00
Guillaume Ayoub
47815d1b01 Handle font subsets 2020-05-31 01:20:38 +02:00
Guillaume Ayoub
eaeef5128d Fix some tests 2020-05-30 16:59:58 +02:00
Guillaume Ayoub
370f87dce1 Don’t include zero-width characters in subsets 2020-05-30 16:24:38 +02:00
Guillaume Ayoub
9a9751f529 Fix border tests 2020-05-30 15:58:34 +02:00
Guillaume Ayoub
9372b94e8d Clean formatted strings 2020-05-30 15:55:44 +02:00
Guillaume Ayoub
89651e2f04 Clean css/__init__ 2020-05-30 01:41:16 +02:00
Guillaume Ayoub
259d686aec Clean __init__ and __main__ 2020-05-30 01:27:13 +02:00
Guillaume Ayoub
11901bb9ea Clean document.py 2020-05-30 01:11:30 +02:00
Guillaume Ayoub
e61dd3a761 Don’t crash when font can’t be optimized 2020-05-30 00:30:13 +02:00
Guillaume Ayoub
6593f48430 Ignore but include unknown font tables 2020-05-29 23:41:16 +02:00
Guillaume Ayoub
30cc2c1105 Optimize fonts 2020-05-29 19:43:56 +02:00
Guillaume Ayoub
5fea96e5ca Remove useless imports 2020-05-29 19:01:58 +02:00
Guillaume Ayoub
d7ab2e3bbd Handle woff and woff2 fonts with fonttools 2020-05-24 15:02:28 +02:00
Guillaume Ayoub
8e9e6b6bfe Merge remote-tracking branch 'origin/master' into pydyf 2020-05-23 21:45:45 +02:00
Guillaume Ayoub
7bda70629f
Merge pull request #1120 from Tontyna/target-revisited
create a TargetLookupItem for each anchor
2020-05-23 21:44:34 +02:00
Guillaume Ayoub
3f35459393 Merge remote-tracking branch 'origin/master' into pydyf 2020-05-23 17:39:58 +02:00
Guillaume Ayoub
bea6cef5a6 Fix the terribly wrong line width given by Pango
Pango layouts can generate lines whose logical widths are wider than the layout
maximum width, even if the lines can be broken earlier. This "problem" is
caused by Pango returning rounded Harfbuzz values for line extents, while using
real Harfbuzz values internally to split lines.

In Pango < 1.44, the width value was OK.

We could open an issue on Pango to ask if there’s a way to get reliable
information about line widths.

Or we could just shoot Pango and only use Harfbuzz, as other browsers do.

We can do that as soon as we’ve removed Cairo.

I’m not joking. I never am.

Fix #1051.
2020-05-23 17:27:14 +02:00
Guillaume Ayoub
cf7ea6f4de Merge remote-tracking branch 'origin/master' into pydyf 2020-05-23 09:41:49 +02:00
Guillaume Ayoub
f6f9f144c2 Handle most cases for boxes avoiding flots in rtl containers
Fix #1110.
2020-05-22 17:09:17 +02:00
Guillaume Ayoub
ca9f962dcd Remove useless TODO 2020-05-22 02:28:51 +02:00