1005 Commits

Author SHA1 Message Date
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
Antonio Cavedoni
742983f087 Add QuartzPen 2020-11-20 12:38:43 +01:00
Cosimo Lupo
ae07ce6e55
Merge pull request #2100 from fonttools/switch-to-gha
Switch to GitHub Actions
2020-11-20 11:03:54 +00:00
Cosimo Lupo
685b047565 varLib_test: fix failing windows tests
os.path.relpath requires that src and dst be on the same mount drive; GH Actions windows runner create the temporary directory on a different drive than the one where the source is cloned.
2020-11-20 10:06:58 +00:00
Simon Cozens
3e964ad8da
Merge pull request #2101 from simoncozens/alternate-contextual-representations
[otlLib] Build format 1 and format 2 contextual lookups
2020-11-18 07:34:04 -08:00
Simon Cozens
a99bd4296a Tests for GSUB5/GSUB6 formats 1, 2 and 3 2020-11-17 15:17:02 +00:00
Simon Cozens
47d95c5e30 Fix varLib test expectations 2020-11-17 12:19:35 +00:00
Cosimo Lupo
b6ef2408c5
colorLib_test: test that we accept either tuple or list for COLRv0 layer
https://github.com/googlefonts/ufo2ft/issues/426
2020-11-16 16:29:18 +00:00
Simon Cozens
db37b3bd9a Update test expectations 2020-11-16 13:42:22 +00:00
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