Just van Rossum
90c7c7fae1
Fix for #1985 : ensure that the AxisNameID in the STAT table is > 255 ( #1986 )
...
Fix for #1985 :
* ensure that the AxisNameID in the STAT table is not less than 256. This needed an additional argument to the addMultiLingualName() name table method.
* fvar axis name IDs must also not be less than 256, just like STAT axis names.
2020-06-08 19:39:28 +02:00
Cosimo Lupo
7ca42f6623
Merge pull request #1967 from anthrotype/pickle
...
sfnt: add __getstate__ and __setstate__ to SFNTReader to make it pickelable
2020-05-19 14:03:52 +01:00
Cosimo Lupo
cdd10373f0
sfnt_test: add test for deepcopy and pickle
2020-05-19 13:19:01 +01:00
Just van Rossum
db26cf804e
[ttLib.name] Fix findMultilingualName() ( #1963 )
...
* when reading from binary, name.string may be an encoded bytes sequence: we should call toUnicode() before we compare to the requested string
* fix expected output
2020-05-16 11:29:23 +02:00
justvanrossum
0dc0222f59
if the binary data happens to be ascii, emit a comment with an ascii representation
2020-05-08 10:37:01 +02:00
Just van Rossum
4febf38be2
[ttLib.name] Add nameTable.findMultilingualName() method ( #1921 )
...
* add nameTable.findMultilingualName(), to find an existing multilingual name
* Make addMultilingualName() reuse nameIDs if possible when asking for a new nameID, by calling findMultilingualName()
2020-05-07 11:06:51 +02:00
justvanrossum
2242aff863
fix expected gvar output to be sorted by glyph name
2020-04-29 16:32:56 +02:00
Cosimo Lupo
d2bbfdb610
Merge remote-tracking branch 'origin/master' into otdata-colr
2020-03-12 17:42:56 +00:00
Cosimo Lupo
d9144d4dfc
C_O_L_R_test: add tests for COLRv1 decompile/compile/fromXML/toXML
2020-03-11 19:01:26 +00:00
Simon Cozens
8fac69b0ea
Also output mark attachment class
2020-03-11 13:59:05 +00:00
Simon Cozens
ab075a9957
Annotate LookupFlag ttx dump
2020-03-10 21:42:28 +00:00
Cosimo Lupo
d659e055b2
Merge remote-tracking branch 'origin/master' into otdata-colr
2020-03-02 10:59:55 +00:00
Cosimo Lupo
0d53cfbb99
woff2_test: add test with CBDT/CBLC font without glyf/loca tables
2020-02-26 18:24:53 +00:00
Cosimo Lupo
f60bcc2c5a
[CPAL] the absence of a color palette label nameID is 0xFFFF, not 0
2020-02-17 17:03:37 +00:00
Cosimo Lupo
183792c747
_g_l_y_f_test: add tests for Glyph.getCoordinates and GlyphComponent.to/fromXML
2020-02-13 18:08:38 +00:00
Cosimo Lupo
92e770ea16
_g_l_y_f_test: add tests for compiling/decompiling empty glyf table
2020-02-12 14:25:25 +00:00
Cosimo Lupo
423274e444
C_O_L_R_test: use ttLib class's decompile/compile methods
2020-02-10 13:47:20 +00:00
Cosimo Lupo
d4a5e1bf3e
Add C_O_L_R_test.py to check basic compile/decompile of otTables.COLR
2020-02-04 17:15:39 +00:00
Cosimo Lupo
8e2e7d98fc
add C_B_L_C_test.py to test we compile index table format 3 correctly
2020-02-03 14:07:25 +00:00
Cosimo Lupo
58cbf7b814
otTables_test: get XML dumps for expected MarkBasePos split subtables
...
This tests will fail because of this bug: https://github.com/googlefonts/noto-source/issues/145
The mark records' Class values of the second subtable should be updated to match the new class count
(the two split subtable contain half of the original mark classes). Otherwise the base records would
implicitly reference the wrong or non-existent mark classes...
The fix is in the following commit.
2020-01-07 12:57:20 +00:00
Just van Rossum
cf0e43d6e5
[ttLib.glyf] make glyph.draw() skip redundant final lineTo() ( #1775 )
...
* [ttLib.glyf] make glyph.draw() skip redundant final lineTo()
This ensures that g.draw(pen) and g.drawPoints(PointToSegmentPen(pen)) are now 100% equivalent.
2019-12-12 13:44:10 +01:00
Just van Rossum
e2c60e3dcb
[ttLib.glyf] Fix flag bug in glyph.drawPoints() ( #1774 )
...
This was the same problem as glyph.draw() had, as reported in #1771 .
2019-12-08 21:55:30 +01:00
Just van Rossum
46a06cabf2
[ttLib.glyf] Make sure to use the flagOnCurve mask in glyph.draw() ( #1772 )
...
* When drawing glyf outlines to a pen, make sure to use the flagOnCurve mask, so we don't trip over the overlap flag, that is set when instantiating variable fonts to indicate that overlaps are ok.
Fixes #1771 .
2019-12-06 10:27:31 +01:00
Nikolaus Waxweiler
e4f7495f32
[name] Be less cautious about getting data for NameRecord comparisons
2019-10-11 17:39:56 +01:00
Nikolaus Waxweiler
2e82438d93
[name] Handle duplicate name records with different string
types
2019-10-11 14:24:03 +01:00
Cosimo Lupo
2eeba71d5f
fix cvar, gvar and instancer tests to compare floats as almost-equality
2019-10-08 13:40:07 +01:00
Cosimo Lupo
c60512de0e
_g_l_y_f: use floatToFixedToStr and strToFixedToFloat in GlyphComponent toXML/fromXML
2019-10-08 13:40:06 +01:00
Cosimo Lupo
8791caf3b8
_a_v_a_r: use floatToFixedToStr and strToFixedToFloat in toXML/fromXML methods
2019-10-08 13:40:05 +01:00
Cosimo Lupo
d66c92fbe0
_f_v_a_r: use floatToFixedToStr and strToFixedToFloat in Axis and NamedInstance
2019-10-08 13:40:05 +01:00
Cosimo Lupo
b50c10af7a
TupleVariation_test: test toXML and fromXML with float axis supports
2019-10-08 13:40:05 +01:00
Cosimo Lupo
e9c7a5227a
_n_a_m_e_test: more tests for removeNames
2019-09-11 15:01:46 +02:00
Cosimo Lupo
7dd510b3b8
Merge pull request #1719 from m4rc1e/name-remove
...
[name] add removeName method to table__n_a_m_e
2019-09-11 14:53:11 +02:00
Marc Foley
4e316cae57
[name] add removeNames method to table__n_a_m_e
2019-09-11 11:56:09 +01:00
Cosimo Lupo
f2915e7480
Merge pull request #1706 from dscorbett/splitMultipleSubst
...
Fix MultipleSubst subtable overflows
2019-09-11 09:53:13 +02:00
David Corbett
47c671b1e0
Test splitMultipleSubst
2019-09-10 13:17:40 -04:00
Cosimo Lupo
7c2adacec5
_h_h_e_a_test: add tests for hhea.descender, alias of 'descent'
2019-09-10 16:27:22 +02:00
Simon Cozens
6e55f939e3
[ttLib] Add aliases for renamed entries in hhea table
...
Closes #1714
2019-09-05 12:38:45 +01:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Cosimo Lupo
1726a4a1fc
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-20 15:05:34 +01:00
Cosimo Lupo
84e9ea167a
woff2: allow to recompress woff2 while keeping flavorData
...
optionally modifying the list of transformed tables
2019-06-19 12:13:14 +01:00
Cosimo Lupo
6f1d25497a
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-18 18:45:47 +01:00
Cosimo Lupo
3f6a381132
woff2_test: add tests for main() console entry point
2019-06-14 18:30:32 +01:00
Cosimo Lupo
11bfc6856d
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-14 11:31:30 +01:00
Cosimo Lupo
18efee2c7b
TupleVariation: rename get{DeltaType,CoordWidth}; do not special-case scalar=0
...
we still need to branch between the case where coordinates are wrapped in (x, y) tuples or naked floats.
2019-06-14 11:03:38 +01:00
Cosimo Lupo
8bd83f36bd
woff2_test: add tests for transformed hmtx and untransformed glyf+loca
2019-06-13 18:46:46 +01:00
Cosimo Lupo
0162446f4c
woff2: don't normalize glyf+loca if we aren't transforming them
...
Also, the TTFont.getGlyphOrder() automatically makes up a dummy
glyph order from the maxp.numGlyphs, we simply need to ensure
'maxp' is decompiled before 'glyf'.
When transforming glyf, the glyf.glyphOrder is guaranteed to
be present (as the glyf table has been already decompiled), so
we don't need to deal with it being missing or incorrect
(hence removed spurious tests).
2019-06-12 18:41:13 +01:00
Cosimo Lupo
6b0e350a06
woff2_test: remove test for no longer reserved bits 6-7
2019-06-11 15:23:58 +01:00
Cosimo Lupo
9af92fdb41
woff2_test: fix up flaky tests
...
some tests were failing when shuffling the order of the tests with
pytest-randomly. That's because calling TTFont.getTableData method
on 'loca' table before having compiled 'glyf' returns an empty b""
string.
2019-06-11 13:22:38 +01:00
Cosimo Lupo
125bd5186a
TupleVariation: rename {check,get}DeltaType; refactor __iadd__
2019-04-12 17:01:39 +01:00
Cosimo Lupo
dc99925bee
instancer: always calculate inferred deltas upfront to simplify code
...
and instead of sumDeltas method, use in-place add operator.
2019-04-04 18:05:11 +01:00