Nikolaus Waxweiler
f6a62e0db1
Merge pull request #2164 from fonttools/pen-maintenance
...
Pen maintenance
2021-02-22 10:26:39 +00:00
Nikolaus Waxweiler
839c57a50d
Remove some Python 2 vestiges from pen tests
2021-02-21 10:30:17 +00:00
Nikolaus Waxweiler
ab1883da1d
Turn AbstractPen and AbstractPointPen into ABCs plus typing
2021-02-21 10:20:37 +00:00
Denis Moyogo Jacquerye
537fabcee9
[feaLib] update tests for indented anchors
2021-02-18 19:19:18 +00:00
Simon Cozens
bac9a1cba3
Merge pull request #2185 from simoncozens/fontbuilder
...
fontBuilder improvements
2021-02-15 15:23:32 +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
dda10e0f00
WIP: add test_subset_COLRv1
2021-02-15 11:12:16 +00:00
rsheeter
7abd234929
Update tests for new formats
2021-02-15 10:42:59 +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
Simon Cozens
3871537abd
Update test expectations; multilingual names got shared instead of duplicated
2021-02-12 12:11:51 +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
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
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
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
Cosimo Lupo
93c23eaaf7
COLRv1: define new PaintSweepGradient, amend tests with new format numbers
2021-02-03 18:21:09 +00:00
Cosimo Lupo
8f66a1e813
COLRv1: add functions to un-build COLR otTables to raw dicts
...
This adds an unbuildColrV1 which does the inverse of colorLib.builder.buildColrV1.
Takes a LayerV1List and BaseGlypV1List and returns a map of base glyphs to raw data structures (list, dict, float, str, etc.).
Useful not only for debugging purpose, but also for implementing COLRv1 subsetting (where we need to drop whole chunks of paints which may be reused by multiple glyphs).
2021-02-03 16:47:59 +00:00
Simon Cozens
d1e85cb888
Allow 'sub X by NULL;' sequence to delete a glyph
2021-02-03 14:12:46 +00:00
Nikolaus Waxweiler
8569a8435f
Update Tests/ttLib/woff2_test.py
...
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2021-01-28 16:35:36 +00:00
Nikolaus Waxweiler
52e3e03ed9
An off-curve should stay off even with flags
2021-01-28 16:30:23 +00:00
Cosimo Lupo
7db6b8aae5
Merge pull request #2155 from daltonmaag/add-verbose-error-for-classdefbuilder-add
...
Raise an exception when ClassDefBuilder attempts to add a duplicate glyph.
2021-01-25 17:19:21 +00:00
Tom Archer
be898ec6f9
Change ValueError to OpenTypeLibError
2021-01-20 14:30:49 +00:00
Cosimo Lupo
81fa5b5265
Merge pull request #2137 from fonttools/x-mac-encodings-errors
...
codecs: handle errors different from 'strict' for extended mac encodings
2021-01-20 11:21:43 +00:00
Tom Archer
9712407054
Change TypeError to ValueError
2021-01-20 11:19:43 +00:00
Tom Archer
7c6337facf
Add exception and test
2021-01-19 17:57:53 +00:00
Cosimo Lupo
7516e0d95d
builder_test: add test with len(paints) > 255
2021-01-18 17:35:48 +00:00
Cosimo Lupo
9d33afe04d
COLRv1: support unlimited paints as 255-ary tree of PaintColrLayers
...
Fixes https://github.com/googlefonts/nanoemoji/pull/225
E.g. BASKET noto-emoji U+1F9FA contains 364 layers
2021-01-18 17:33:21 +00:00
Cosimo Lupo
a8d366e3b2
Merge pull request #2148 from fonttools/colr-fix-c0-almost-inside-c1
...
COLRv1: avoid abrupt change after rounding c0 when too near c1's perimeter
2021-01-18 09:59:39 +00:00
Cosimo Lupo
b465dcff75
rename function to round_start_circle_stable_containment
...
as suggested in https://github.com/fonttools/fonttools/pull/2148#discussion_r557656073
2021-01-15 17:37:11 +00:00
Cosimo Lupo
4f1102ac6e
add a Circle class, handle concentrical case, explain why 2 iterations are enough
2021-01-15 16:59:17 +00:00
Cosimo Lupo
db14e6375e
COLRv1: avoid abrupt change after rounding c0 when too near c1's perimeter
...
Fixes https://github.com/googlefonts/picosvg/issues/158
Also see https://github.com/googlefonts/colr-gradients-spec/issues/204
2021-01-14 17:13:22 +00:00
Nikolaus Waxweiler
03655e55d3
Change test data to make it pass
2021-01-13 16:30:46 +00:00
Nikolaus Waxweiler
586144442d
Add test
2021-01-12 17:21:22 +00:00
Tim Gates
56310f38cf
docs: fix simple typo, ovverride -> override
...
There is a small typo in Tests/ttLib/woff2_test.py.
Should read `override` rather than `ovverride`.
2020-12-28 09:06:44 +11:00
Cosimo Lupo
d8c42ef7f0
codecs: handle errors different from 'strict' for extended mac encodings
...
Fixes #2132
2020-12-24 20:37:52 +01:00
Cosimo Lupo
538528d5a1
COLRv1: Implement PaintTranslate
...
https://github.com/googlefonts/colr-gradients-spec/pull/163
2020-12-15 16:58:31 +00:00
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
rsheeter
d888526659
Hook up paint skew and rotate
2020-12-02 21:21:19 -08:00
Seth Michael Larson
d5353a4085
Switch from brotlipy to brotlicffi for PyPy support
2020-12-01 19:37:02 -06:00
Cosimo Lupo
296987e788
Merge pull request #2112 from khaledhosny/layout-scripts-langsys
...
[subset] Allow LangSys tags in --layout-scripts
2020-11-25 16:44:33 +00:00
Nikolaus Waxweiler
8ca141852d
UFOReader: always expect contents.plist
2020-11-23 14:34:16 +00:00
Nikolaus Waxweiler
8d2a3ae6d2
Add expectContentsFile parameter to GlyphSet
...
For use when reading existing UFOs, to comply with the specification stating that a contents.plist file must exist in a glyph set.
Closes https://github.com/fonttools/fonttools/issues/2111 .
2020-11-23 13:57:32 +00:00
Khaled Hosny
d8e546df5f
[subset] Allow LangSys tags in --layout-scripts
...
Allow specifying which LangSys tags to accept for each script, using
script.lang form. For example:
--layout-scripts=arab.dflt,arab.URD,latn
To keep DefaultLangSys and “URD” language for “arab” script, and all
languages for “latn” script.
2020-11-20 23:38:29 +02:00