Khaled Hosny
fe2c31b6f4
Merge pull request #2037 from khaledhosny/fealib-lookupflag-anonclass
...
[feaLib] Allow anonymous glyphclass in LookupFlags
2020-08-17 17:15:52 +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
Khaled Hosny
7db9ba6ef6
[feaLib] Allow anonymous glyphclass in LookupFlags
...
Almost everywhere else when a glyph class name is accepted, anonymous
glyph classes are also accepted. This is rather inconsistent and
inconvenient.
2020-08-07 19:57:31 +02:00
Simon Cozens
e3e12fe60d
Fix mock builder test
2020-07-22 14:20:50 +01:00
Simon Cozens
85edf0e380
Use the ChainContextualRule class instead of bare tuples
2020-07-22 14:20:50 +01:00
Simon Cozens
cbe6d3a3f4
Merge pull request #2016 from simoncozens/gsub5-gpos7-lookups
...
Generate GSUB5/GPOS7 lookups (See #1856 )
2020-07-11 21:51:47 +01:00
Simon Cozens
0b39745890
Restore test for chaining version
2020-07-11 19:56:29 +01:00
Simon Cozens
b6f7b2dc4b
Stylistic fixes from feedback
2020-07-11 19:54:52 +01: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
Simon Cozens
6d4c5fe31c
Rename GPOS8->GPOS7
2020-07-07 13:35:33 +01:00
Simon Cozens
4adea942cc
Fix varlib test expectations - now badly named.
2020-07-07 13:33:32 +01:00
Simon Cozens
bc0f69884e
Thinko
2020-07-07 13:28:44 +01:00
Simon Cozens
7db13c9872
Fixup test expectations
2020-07-07 13:24:41 +01:00
Simon Cozens
e8798059f2
Rename test
2020-07-07 13:20:57 +01:00
Simon Cozens
2cf9f681a2
Fix test expectation. Test is now badly named.
2020-07-07 13:19:50 +01:00
Simon Cozens
9f4cc2f1cb
Introduce the concept of a ClassContextualRuleSet
...
Currently unused but will be super helpful for optimizing the formats of contextual lookups.
* Splits the rules of a class contextual lookup based on explicit subtable breaks
* Returns various properties on the ruleset to help determine appropriate layout format.
* (More properties, such as "touched glyphs", planned - will be added when needed.)
2020-07-07 12:44:25 +01:00
Cosimo Lupo
64731aedd0
Merge remote-tracking branch 'origin/master' into colrv1-rev2
2020-07-03 12:58:57 +01:00
Simon Cozens
73631c9642
otlLib documentation ( #2009 )
...
Document otlLib
Includes other minor changes:
* When a markFilterSet parameter is passed to a builder, LOOKUP_FLAG_USE_MARK_FILTERING_SET will be added to the lookup's flags.
* The unused arguments valueformat1 and valueformat2 were removed from ClassPairPosSubtableBuilder.
2020-07-03 12:52:50 +01:00
Simon Cozens
3b50a533d5
otlLib now sets this flag itself.
2020-07-03 12:37:22 +01:00
Cosimo Lupo
dc2ee4e082
glifLib_test: check case insensitive filenames are unique
...
tests for https://github.com/fonttools/fonttools/pull/2002
2020-07-03 11:37:17 +01:00
Cosimo Lupo
070e9a7c7d
Merge remote-tracking branch 'origin/master' into colrv1-rev2
2020-07-02 14:41:43 +01:00
Simon Cozens
ebfa4ba1fe
Move feature builders to otlLib
...
Refactors feaLib, moving code which builds OpenType lookups into otlLib. Note that this changes feaLib's concept of `location` from a tuple to an object.
2020-07-02 14:09:10 +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
4578f96e9d
colorLib_test: minor cosmetic changes
2020-07-01 18:29:26 +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
Khaled Hosny
d2167235e0
[voltLib] Accept DO_NOT_TOUCH_CMAP keyword
...
Corresponds to the “Do not overwrite camp table” option in VOLT.
2020-06-08 03:19:06 +02:00
Khaled Hosny
a1df9175ee
[voltLib] Support writing back ast as VOLT data
...
Adds __str__() method to ast classes that writes back VOLT data. Tries
to replicate VOLT syntax idiosyncrasies as much as possible for better
round-trip conversion.
2020-06-04 14:08:20 +02:00
Khaled Hosny
3c4f5a75bf
[voltLib] Unescape new line in lookup comments
2020-06-04 14:08:20 +02:00
Nikolaus Waxweiler
fe17d5937a
[feaLib] Builder.build(): proper error msg on unsupported tables ( #1976 )
...
Raise NotImplementedError instead of an assertion error.
2020-05-29 16:44:19 +01:00
Nikolaus Waxweiler
0e7a4460f3
[feaLib] Introduce includeDir on Parser and IncludingLexer ( #1973 )
...
This makes the directory to search for included files explicit.
Also use Python 3's FileNotFoundError to catch non-existant files instead of a workaround for Python 2.
2020-05-28 17:43:19 +01:00
Tom Archer
0e04e039cf
Add more glyphs to test group to prove order is preserved
2020-05-22 10:41:10 +01:00
Tom Archer
6f72429150
Small changes
2020-05-22 09:55:16 +01:00
Tom Archer
b88f717885
Get test working that shows duplicates are removed
2020-05-22 09:53:40 +01: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
Cosimo Lupo
cbe84da8c3
varLib_test: comment why font.close() is needed
2020-05-19 10:57:09 +01:00
Cosimo Lupo
a6612aa6b5
varLib_test: close TTFont otherwise shutil.rmtree fails on Win
...
https://ci.appveyor.com/project/fonttools/fonttools/builds/32948704/job/hc91qjisv4nv603m#L400
2020-05-18 13:16:05 +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
Nikolaus Waxweiler
45a8fcefc2
[varLib] Allow feature variations to be active across the entire space ( #1957 )
...
* Allow feature variations to be active across the entire space
* Add test with empty condition set
* Skip initial box instead of removing it
* Correct comment
2020-05-15 09:27:15 -07:00
Cosimo Lupo
f4752fd412
Merge remote-tracking branch 'origin/master' into ufo-minor-format-version
2020-05-14 11:01:39 +01:00
Nikolaus Waxweiler
b07940421d
Fix test_addRuleDescriptor
...
Use API correctly.
2020-05-13 15:45:27 +01:00