983 Commits

Author SHA1 Message Date
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
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
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
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