Guillaume Ayoub
aeb00c576b
Only apply text-indent to lineboxes
...
Fix #1000 .
2020-03-16 23:55:39 +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
76479de01f
Don't align lines larger than their parents
...
Related to #867 .
2019-05-17 16:19:42 +02:00
Guillaume Ayoub
cc512b3ec0
Fix line breaking tests
2019-04-12 16:27:33 +02:00
Guillaume Ayoub
039b0a680d
Don't rely on iter_get_index to get current line break index
...
pango_layout_iter_get_index gives the visual order, not the logical order, so
we can't rely on this to fix the line break index.
Fix #828 .
2019-04-12 16:04:25 +02:00
Guillaume Ayoub
167ebce065
Please isort again
2019-03-10 19:34:16 +01:00
Guillaume Ayoub
b7a9fe7dcc
Update copyright
2019-03-04 11:04:06 +01:00
Guillaume Ayoub
51dcbe36a5
Don't crash when removing trailing whitespaces on pre-line blocks
...
Fix #610 .
2019-03-01 16:03:04 +01:00
Guillaume Ayoub
0cc5478252
Fix imports for isort
2019-03-01 11:38:03 +01:00
Guillaume Ayoub
a5ce96e8d7
Don't always set resume_at to None when the whole text fits
...
We want to keep resume_at for example when the text ends with a forced end of
line.
Fix #813 .
2019-03-01 11:09:17 +01:00
Guillaume Ayoub
f67b7a6083
Update line width when splitting lines with glued inline children
...
Fix #637 .
2019-01-22 00:28:37 +01:00
Guillaume Ayoub
723fb4e20e
Couple of fixes with automatic and manual hyphenation
...
Fix #109 , fix #748 .
2019-01-02 17:45:56 +01:00
Guillaume Ayoub
b0944e718a
Fix text-indent at the beginning of the page
...
Fix #706 .
2018-10-26 18:49:40 +02:00
Guillaume Ayoub
6b24c25d5a
Parametrize text-indent test
2018-10-26 18:49:19 +02:00
Guillaume Ayoub
67b49fc5c7
Install DejaVu fonts with homebrew
2018-03-30 00:13:36 +02:00
Guillaume Ayoub
3b32146348
Don't rely on installed ahem font for tests
2018-03-27 00:44:33 +02:00
Guillaume Ayoub
8f2f6b30c2
Clean latest tests
2018-03-19 22:35:15 +01:00
Guillaume Ayoub
595ba6a74c
Split layout tests
2018-03-14 01:32:01 +01:00
Guillaume Ayoub
13bba98d91
Fix text justification for indented text
...
Related to #507 .
2018-01-21 16:08:29 +01:00
Guillaume Ayoub
16e8186568
Drop Python 2 support
2018-01-14 01:48:17 +01:00
Guillaume Ayoub
ad11edfff2
Remove StyleDict objects
2018-01-13 17:41:08 +01:00
Guillaume Ayoub
588203b9eb
Remove useless line_width parameter and line_widths function
2017-10-21 16:56:25 +02:00
Guillaume Ayoub
363e9f6bd2
Unprefix properties defined in specifications
2017-08-17 07:42:42 +02:00
Guillaume Ayoub
f7903925fd
Use a separate variable for justification spacing
2017-08-01 10:07:36 +02:00
Guillaume Ayoub
a3e2c474f0
Transform StyleDict into a kind of frozen dict
...
This forces to use a copy when changes are needed. Internal mutable structures
have also been changed into immutable ones (i.e. lists have been turned into
tuples).
This change is a really useful first step to greatly optimize memory and time
needed to render large documents, as allows us to cache style dicts more
safely. It's been already done in StyleDict.inherit_from, with a ~5-10% memory
benefice.
2017-07-28 13:35:06 +02: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
72022e421d
Merge remote-tracking branch 'origin/master' into perf
2016-11-03 12:55:14 +01:00
Guillaume Ayoub
9abc034773
Change StyleDict into a real dict
...
This commit has a really good impact on speed (+15~30%) but a really bad
impact on memory usage (+30~40%).
2016-11-01 02:32:06 +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
a0dc9d9272
Support text-transform: full-witdh
2016-08-21 00:47:13 +02:00
Guillaume Ayoub
62dc7fed91
Flake8
2016-08-20 23:42:10 +02:00
Guillaume Ayoub
3ecf7972ee
Small fix for tab-size
2016-08-20 23:37:24 +02:00
Guillaume Ayoub
43b087eb57
Add tests for tab-size
2016-08-20 23:31:12 +02:00
Guillaume Ayoub
6166fe49e1
Split the test_layout file
2016-08-20 22:58:43 +02:00
Alex Eftimie
93f497bf11
Replace utf8 with utf-8 for gettext compatibility
2015-11-25 09:38:01 +02:00
Simon Sapin
c34221d215
2014.
2014-01-10 14:27:02 +00:00
Guillaume Ayoub
71da008408
Fix broken tests
2013-04-12 20:09:41 +02:00
Guillaume Ayoub
9d90ff627f
Don't draw empty lines with no forced line breaks
2013-04-08 19:09:56 +02:00
Simon Sapin
171438f48e
2013
2013-04-03 16:23:48 +02:00
Guillaume Ayoub
4011792ee0
Don't remove spaces between inline blocks
2013-03-13 13:49:51 +01:00
Guillaume Ayoub
2325b4c2f4
Give the line length to split_first_line
2012-11-24 16:14:49 +01:00
Guillaume Ayoub
1eb22ed63b
Remove spaces at the end of the text lines
2012-11-22 23:52:50 +01:00
Simon Sapin
d1971b6e63
Remove unused imports.
2012-08-03 13:32:42 +02:00
Simon Sapin
0095d080b8
Always pass a list as font-family
...
... otherwise ','.join() will take a string character-by-character …
2012-07-28 19:23:54 +02:00
Simon Sapin
2cab7b9c68
Remove the PyGTK vs. PyGObject 3 test, it did not bring much.
2012-07-27 17:56:31 +02:00
Simon Sapin
4730e414ef
Add PyGTK compatiblity (vs. PyGObject 3.x)
...
First try to import Pango through PyGObject 3.x and introspection.
If that fails or if the WEASYPRINT_USE_PYGTK is set and non-empty,
fall back on PyGTK and the "old-style" bindings without introspection.
2012-07-23 19:01:23 +02:00
Simon Sapin
97f3eee889
Refactor text handling
...
* Kill the TextFragment class. Use a set of functions instead.
* Pass around an `enable_hinting` boolean rather than a dummy surface
2012-06-21 17:22:01 +02:00
Simon Sapin
b6ea3821b8
Remove unused imports
2012-05-22 16:34:41 +02:00
Simon Sapin
aef93f27dc
Fix text-related tests (changed on a PyGobject upgrade???)
2012-05-04 17:05:47 +02:00