1063 Commits

Author SHA1 Message Date
Cosimo Lupo
e7494bbfb9
Merge pull request #2094 from fonttools/svg-arc-flags-no-spaces
svgLib: handle arc commands with bool flags not separated by space/comma
2020-11-11 19:20:31 +00:00
Cosimo Lupo
ed718db677
Merge pull request #2092 from fonttools/colrv1-latest
update colorLib to latest COLRv1 draft
2020-11-11 19:00:10 +00: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
rsheeter
cf2097f7c0 Update to builder per review discussion 2020-11-10 21:51:33 -08:00
rsheeter
cd39e6e246 Add a test 2020-11-06 14:59:52 -08:00
rsheeter
5c83b5be47 Don't generate a PaintColrLayers for a list of 1 2020-11-04 21:59:30 -08:00
rsheeter
f531038bf9 Start hooking up revised PaintColrLayers 2020-11-04 14:36:43 -08: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
aad51ec4d9
svgLib: handle arc commands with bool flags not separated by space/comma
Some SVG authoring tool write arc commands without any space or comma around the boolean 'large-arc' and 'sweep' flags, leading our svg path parser to choke.
This makes the path parser smarter by special-casing arc command parsing so that it only consumes one character ('0' or '1') for these special boolean flags.
2020-10-29 15:31:47 +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
8cffabfb58
builder_test: test buildPaint{ColorGlyph,Transform,Composite} 2020-10-26 18:14:13 +00:00
Cosimo Lupo
1803283baf
colorLib: use IntEnum instead of 'magic' Paint format integers
makes code more readable
2020-10-26 18:14:13 +00:00
Jens Kutilek
b9c268943a
Add HashPointPen from psautohint (#2005)
* Add HashPointPen from psautohint (with changes)
* Decompose components
* Use format string and disambiguate critical changes
* Remove "getHash()" in favour of "hash" property
* Add transformation for composites
* Omit base glyph name from component hash
* Use untransformed coords for components
* Add tests
* Add example code

Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-10-22 11:16:24 +02: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
09fa418eb0
Merge remote-tracking branch 'origin/master' into colrv1-latest 2020-10-20 16:11:54 +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
a2aaf41a7e
colorLib: rename builders to match current Paint format names 2020-10-09 19:36:35 +01:00
Cosimo Lupo
fdf6a5c1fc
colorLib: update builders to latest COLRv1 draft
LayerV1Record and Affine2x2 are gone.
LayerV1List now contains a list of Paint DAGs
Added 4 new Paint formats: PaintGlyph, PaintColorGlyph, PaintTransform
and PaintComposite
2020-10-09 19:36:35 +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
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