1142 Commits

Author SHA1 Message Date
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
b992e28374
[varLib] Add designspace lib key for custom feavar feature tag (#2080)
* Add designspace lib key to specify a custom feature tag for feature variations, as discussed in #2079

* Added comment for the lib key

* if the lib key is present, the 'processing' flag should be ignored completely
2020-10-08 14:21:42 +02:00
Cosimo Lupo
558b9cba7c
Merge pull request #2077 from fonttools/feature-variations-none
[instancer] FeatureVariations table is optional in GSUB 1.1 and can be None
2020-10-05 19:17:43 +01:00
Cosimo Lupo
e16cf0f8b8
instancer_test: check GSUB.FeatureVariations set to None is skipped
and doesn't raise TypeError exception.
2020-10-05 18:59:21 +01:00
Nikolaus Waxweiler
04e1269b41 [glifLib] Hard-require x and y coordinates 2020-10-03 12:43:28 +01:00
Cosimo Lupo
1329c8f7db
instancer_test: add tests for --remove-overlaps on generated VF instance 2020-09-29 19:38:17 +01:00
Simon Cozens
a18b6bfb6c
Merge pull request #2052 from simoncozens/fealib-debug
feaLib source debugging
2020-09-17 20:13:23 +01:00
Simon Cozens
7135255d4a Style nits 2020-09-11 09:35:45 +01:00
Simon Cozens
70b514270e Add debug tests 2020-09-10 08:29:04 +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
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