rsheeter
40f95ba4ea
Update C_O_L_R_test.py; try to make the binary data test more palatable
2020-12-03 12:48:47 -08:00
Seth Michael Larson
d5353a4085
Switch from brotlipy to brotlicffi for PyPy support
2020-12-01 19:37:02 -06:00
Cosimo Lupo
698d43cfb0
C_O_L_R_test: update table's handwritten binary blobs
2020-11-11 17:41:44 +00:00
Cosimo Lupo
c695429b1b
C_O_L_R_test: undo PaintColrSlice
2020-11-11 17:41:44 +00:00
Cosimo Lupo
e992953474
swap xy and yx fields in COLRv1 Affine2x3 struct
...
following the latest draft
See discussion at https://github.com/googlefonts/colr-gradients-spec/pull/85
2020-10-30 19:29:59 +00:00
Cosimo Lupo
6c752f677f
rename Paint{ColorGlyph,ColrSlice}
2020-10-27 19:15:50 +00:00
Cosimo Lupo
b654554109
add {First,Last}LayerIndex to PaintColorGlyph
...
as proposed in https://github.com/googlefonts/colr-gradients-spec/issues/86
The name of PaintColorGlyph may still change to PaintColorSlice, or PaintColrSlice, or PaintColorGlyphSlice, etc."
https://github.com/googlefonts/colr-gradients-spec/pull/87
2020-10-27 12:47:10 +00:00
Cosimo Lupo
ce11d0ede8
C_O_L_R_test: test roundtrip Paint{Transform,ColorGlyph,Composite}
2020-10-26 18:14:13 +00:00
Cosimo Lupo
fc625963fa
otTables: dump the format name of Paint tables as XML comment
2020-10-20 19:03:17 +01:00
Cosimo Lupo
73073be3c2
Affine2x3 struct should be inlined inside PaintTransform
...
Not pointed to by an Offset32.
Thanks Dominik for spotting this!
2020-10-12 14:32:23 +01:00
Cosimo Lupo
7f6a05b007
otData: add new COLR Paint struct definitions, update to latest draft
...
Update C_O_L_R_test.py accordingly.
a
2020-10-09 19:36:35 +01:00
Just van Rossum
9064e53c7a
Add registry for custom table packer/unpacker classes ( #2055 )
...
* Add custom table packer/unpacker registry
* fix documentation for getTableClass(): it will never return None
* add unregisterCustomTableClass(), mostly for testing
2020-09-09 11:35:06 +02:00
Just van Rossum
bec19252c5
[ttLib] Fix for #2044 : fix maxp.maxComponentDepth calculation ( #2045 )
...
Fix for #2044 : don't overwrite the initial maxComponentDepth variable, as this will give the wrong value when there are multiple nested components.
2020-08-14 20:13:01 +02:00
Cosimo Lupo
09c0e42031
Partly revert "use 32-bit GlyphIDs in COLRv1 baseGlyphs and layers"
...
This reverts commit 690080b14d9a4f193092ffc172a39b3e212d307c.
We keep 16-bit GlyphIDs for COLRv1 tables, at least for now
https://github.com/googlefonts/colr-gradients-spec/pull/24
I keep the GlyphID32 converter in case we may need it in the future.
2020-07-08 16:06:45 +01:00
Cosimo Lupo
ff79338607
rename radial gradient Paint.Affine attribute to Transform
...
as suggested by Peter Constable in
https://github.com/PeterConstable/OT_Drafts/blob/master/COLR_V1/COLRv1formats_rev3.md#paintformat3-table-conicalradial-gradient
2020-07-02 12:21:12 +01:00
Cosimo Lupo
ac0a755d20
make linear/radial gradient 'point-less', inline x0,y0,x1,y1,...
...
https://github.com/googlefonts/colr-gradients-spec/issues/21
2020-07-02 12:11:40 +01:00
Cosimo Lupo
dea9896421
rename COLR Color -> ColorIndex, transparency to alpha
...
https://github.com/googlefonts/colr-gradients-spec/issues/17
https://github.com/googlefonts/colr-gradients-spec/issues/19
2020-07-02 10:27:47 +01:00
Cosimo Lupo
690080b14d
use 32-bit GlyphIDs in COLRv1 baseGlyphs and layers
...
For forward-compatibility, see https://github.com/googlefonts/colr-gradients-spec/issues/8
2020-07-01 19:50:48 +01:00
Cosimo Lupo
b215c000df
Rename LayerV1Array to LayerV1List, like with BaseGlyphV1List
...
See https://github.com/googlefonts/colr-gradients-spec/issues/14#issuecomment-652542829
2020-07-01 18:22:03 +01:00
Cosimo Lupo
5f18d9891c
rename BaseGlyphV1Array to BaseGlyphV1List
...
As suggested by Peter Constable in https://github.com/googlefonts/colr-gradients-spec/issues/14 and https://github.com/googlefonts/colr-gradients-spec/issues/18
2020-07-01 18:16:07 +01:00
Cosimo Lupo
50546c03c4
[C_O_L_R_test] better annotate offsets in hex dump (2)
2020-07-01 16:14:47 +01:00
Cosimo Lupo
d98e231f4b
[C_O_L_R_test] better annotate offsets in hex dump
2020-07-01 16:13:38 +01:00
Cosimo Lupo
caf3c5d216
[C_O_L_R_test] fixed typo in hex dump
2020-07-01 15:59:47 +01:00
Just van Rossum
dc7d016538
[ttLib.tables._n_a_m_e] Fix #1997 : Only attempt to recovered malformed data from bytes ( #1998 )
...
* don't attempt to recover malformed data from str, only from bytes. Fixes #1997
2020-06-16 16:35:40 +02:00
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