8612 Commits

Author SHA1 Message Date
Cosimo Lupo
f426430dc1
Release 4.20.0 2021-02-15 17:08:53 +00:00
Cosimo Lupo
0219c4871d
Update changelog [skip ci] 2021-02-15 17:08:10 +00:00
Simon Cozens
bac9a1cba3
Merge pull request #2185 from simoncozens/fontbuilder
fontBuilder improvements
2021-02-15 15:23:32 +00:00
Cosimo Lupo
6fa5aa5ea6
Merge pull request #2177 from fonttools/subset-colrv1
Subset COLRv1 & prune unused CPAL entries
2021-02-15 12:12:27 +00:00
Cosimo Lupo
09af39ab53
subset: donwgrade COLRv1 to v0 if all v1 glyphs are dropped 2021-02-15 11:58:56 +00:00
Cosimo Lupo
55c9a0a1ef
update subset_test.py using new COLRv1 dict format 2021-02-15 11:15:42 +00:00
Cosimo Lupo
056aba8e4a
prune unused CPAL palette entries after subsetting COLR glyphs
Fixes https://github.com/fonttools/fonttools/issues/2174
2021-02-15 11:15:42 +00:00
Cosimo Lupo
109c07d16c
subset: support subsetting COLRv1 base glyphs
In COLR.closure_glyphs augment the subset with the glyphs rechable from the COLRv1 base glyphs already in the subset.
In COLR.subset_glyphs, subset and rebuild LayerV1List and BaseGlyphV1List with the base glyphs to keep. Drop COLR if emptied
2021-02-15 11:15:42 +00:00
Cosimo Lupo
4dcc7f83d2
otTables: add Paint.traverse method
paint graph traversal mostly adapted from rsheeter's https://github.com/googlefonts/nanoemoji/pull/233
2021-02-15 11:12:16 +00:00
Cosimo Lupo
4036512a27
C_O_L_R_: factor out method to convert v0 layer records to dict of list
we'll need that when we subset the COLRv0 portion of a COLRv1 table
2021-02-15 11:12:16 +00:00
Cosimo Lupo
dda10e0f00
WIP: add test_subset_COLRv1 2021-02-15 11:12:16 +00:00
Cosimo Lupo
7878c32a85
Merge pull request #2182 from fonttools/colrv1_static
Update otData for static vs variable formats of COLR v1
2021-02-15 11:00:01 +00:00
rsheeter
404072ee99
Fix descriptions in Lib/fontTools/ttLib/tables/otData.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2021-02-15 10:42:59 +00:00
rsheeter
7abd234929
Update tests for new formats 2021-02-15 10:42:59 +00:00
rsheeter
2df3fed98a
Prevent otConverters from ignoring the 'template' type when field name is also a type 2021-02-15 10:42:58 +00:00
rsheeter
f1ecccbbb8
Begin updating for static vs variable versions of COLR v1 Paint 2021-02-15 10:42:55 +00:00
Cosimo Lupo
6106bf7c14
Merge pull request #2181 from fonttools/colr_to_from_dicts
Use otData for dict to COLR conversion
2021-02-15 10:36:52 +00:00
rsheeter
5316ae4b8c Add test to expose missed otRound + fix 2021-02-12 20:23:06 -08:00
rsheeter
0353c809cd Update COLR build fns per review feedback 2021-02-12 10:02:08 -08:00
rsheeter
ec77db3619 Update Lib/fontTools/colorLib/builder.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2021-02-12 10:02:08 -08:00
Simon Cozens
4fb666fee9 Remove tautology 2021-02-12 12:43:58 +00:00
Simon Cozens
3871537abd Update test expectations; multilingual names got shared instead of duplicated 2021-02-12 12:11:51 +00:00
Simon Cozens
1c259eee5f Let instances optionally be InstanceDescriptors
Because if you've got an AxisDescriptor, you've probably got one of
those as well...
2021-02-11 16:07:05 +00:00
Simon Cozens
285f861e45 Localize instance subfamily name too. 2021-02-11 16:05:02 +00:00
Simon Cozens
d470ea4870 Typo 2021-02-11 15:53:35 +00:00
Simon Cozens
04f04474fd Reformat with black for ease of further maintenance 2021-02-11 15:49:21 +00:00
Simon Cozens
4a8617fc92 New setAvar method 2021-02-11 15:46:05 +00:00
Simon Cozens
731f6a3107 Take AxisDescriptor (or objects conforming to its interface) in addFvar 2021-02-11 15:44:54 +00:00
Simon Cozens
8a58225e6d Typo 2021-02-11 15:27:40 +00:00
Simon Cozens
c51c61f436 Remove py23isms 2021-02-11 15:15:35 +00:00
Simon Cozens
9e03da03da Support localised axis names 2021-02-11 14:09:41 +00:00
Simon Cozens
567aadcc72 Document setupFvar 2021-02-11 14:08:36 +00:00
Cosimo Lupo
e542b60dde
colorLib: add generic TableUnbuilder, reverse of TableBuilder 2021-02-10 18:44:28 +00:00
rsheeter
cf4a4087be Generic build fns 2021-02-10 09:40:37 -08:00
Simon Cozens
587b4868cc
Merge pull request #2179 from simoncozens/document-ttglyphstuff
Document expected arguments for _TTGlyphSet, _TTGlyph and TTGlyphPen
2021-02-08 12:29:45 +00:00
Cosimo Lupo
e7ea2b0147
Merge pull request #2175 from fonttools/move-paint-format-enum
COLRv1: fix lazy loading by moving Paint.Format enum outside of Paint class nested scope
2021-02-08 11:54:14 +00:00
Simon Cozens
9cb126b10a Document expected arguments for _TTGlyphSet, _TTGlyph and TTGlyphPen 2021-02-08 11:30:39 +00:00
Cosimo Lupo
df672a7ae4
move PaintFormat enum outside of Paint class nested scope
When a TTFont is loaded with lazy=True, the otTables are only loaded upon BaseTable.__getattr__
when the requested attribute is not found in the instance __dict__.
Since the Paint.Format enum was defined at class level, every Paint instance, even when loaded
lazily, will have a 'Format' attribute and the magic decompile-on-missing-attribute will not
trigger, since the class attribute will be returned when the instance is missing one.

For this reason, and to not add further special cases, it's better to simply move this Paint.Format
enum class outside to the module level scope, and rename it PaintFormat.
2021-02-05 12:11:43 +00:00
Cosimo Lupo
82c32cbf88
C_O_L_R_test: fix incorrect NumLayers
there's actually 3 LayerRecords defined in the COLR_V1_SAMPLE, not 4.
2021-02-05 10:36:12 +00:00
Cosimo Lupo
f0374be5e1
Merge pull request #2171 from fonttools/colorLib-unbuilder
COLRv1: add functions to un-build COLR otTables to raw dicts
2021-02-04 12:34:36 +00:00
Cosimo Lupo
4b17301321
unbuilder: get Format attribute directly from the Paint instance 2021-02-04 12:24:13 +00:00
Cosimo Lupo
e20ccfcf9f
add unbuildPaintSweepGradient 2021-02-04 12:16:29 +00:00
Cosimo Lupo
22d290b06e
Merge remote-tracking branch 'origin/master' into colorLib-unbuilder 2021-02-04 12:09:30 +00:00
Cosimo Lupo
708cb9aef1
Merge pull request #2172 from fonttools/colr-sweep-gradient
COLRv1: add support for PaintSweepGradient
2021-02-04 11:47:34 +00:00
Cosimo Lupo
a3d13abcff
otData: fix typo, add comments 2021-02-04 11:32:22 +00:00
Just van Rossum
3ad56a40db
Merge pull request #2173 from justvanrossum/fix-vector-div
fix fontTools.misc.arrayTools.Vector() division
2021-02-03 20:55:08 +01:00
justvanrossum
f416a5cb17 fix Vector division 2021-02-03 20:24:04 +01:00
Cosimo Lupo
a7d145f027
update tests for PaintSweepGradient 2021-02-03 19:11:44 +00:00
Simon Cozens
45201f68a6
Merge pull request #2170 from simoncozens/delete-glyph
[feaLib] Allow deleting glyphs
2021-02-03 19:06:07 +00:00
Cosimo Lupo
93c23eaaf7
COLRv1: define new PaintSweepGradient, amend tests with new format numbers 2021-02-03 18:21:09 +00:00