1640 Commits

Author SHA1 Message Date
Jens Kutilek
85c80be6b6
Fix missing composite instructions in ttx (#3092)
* Fix calculation of haveInstructions
* Add test
2023-04-25 16:21:24 +02:00
Cosimo Lupo
3615b565ca sbixGlyph: don't use imageData for empty glyphs with graphicType=None
Fixes https://github.com/fonttools/fonttools/issues/3059
2023-03-27 15:23:13 +01:00
Behdad Esfahbod
05872d6878
Merge pull request #2679 from fonttools/avar2
Avar2
2023-03-15 11:56:30 -06:00
Behdad Esfahbod
1deed38b8d [avar2] Add compile test 2023-03-14 14:09:32 -06:00
Jens Kutilek
032616b106
Revert black formatting of inline instruction docs (#3037)
* Revert black formatting of inline instruction docs
* Ignore block when formatting
* Format instruction list with spaces
2023-03-14 16:48:21 +01:00
Jens Kutilek
f1a75bacb2
Handle string input to Program.fromAssembly() (#3038)
* Add tests for fromAssembly() output (#3036)
* Handle string input to fromAssembly() (Fixes #3036)
* Fixups suggested by @anthrotype
* Add some more typing annotations
* Program.assembly always returns List[str] now
* Add annotation for bytecode
* Move code from setter to fromAssembly
* Remove property
* Fix attribute names
2023-03-14 14:51:16 +01:00
Cosimo Lupo
580e3b3b50
otTables: forgot to actually import TTLibError ugh 2023-03-10 19:22:58 +00:00
Behdad Esfahbod
85036d5d83 [avar2] Revert unneeded change to VarIdxMap
We don't use VarIdxMap anymore.
2023-03-10 11:36:31 -07:00
Cosimo Lupo
3c9aa76893
Merge pull request #3027 from fonttools/colr-clipboxes
[COLRv1] Add method to automatically compute ClipBoxes, w/ optional quantization
2023-03-10 15:43:35 +00:00
Cosimo Lupo
c15e77cbc9
ot-spec says skewX angle should be counter-clockwise so we must negate
Transform.skew method assumes skewX angle goes clockwise.

verified using test_glyphs-glyf_colr_1.ttf test font from googlefonts/color-fonts repo.
Will add that to the tests.
2023-03-10 13:16:05 +00:00
Cosimo Lupo
55cc41a24e
[otTables] implement Paint.getTransform, Paint.computeClipBox & COLR.computeClipBoxes
This for now only works for static COLR table, not variable.
2023-03-10 13:16:04 +00:00
Guillaume Ayoub
b2c75bede4 Fix glyph compilation code 2023-03-10 11:34:16 +01:00
Behdad Esfahbod
e9e55b29f7 chmod otData.py 2023-03-08 13:19:51 -07:00
Cosimo Lupo
17f431b9c2
[otTables] switch to generic table traversal for Paint.traverse 2023-03-08 19:19:50 +00:00
Cosimo Lupo
7433c5dbb9
[otTraverse] allow to use custom callback to iterate over subtables 2023-03-08 19:13:48 +00:00
Behdad Esfahbod
b6acb83920 [avar2] Fix fromXML a bit 2023-03-08 11:44:23 -07:00
Behdad Esfahbod
90dd0685a4 [avar] black 2023-03-08 11:24:26 -07:00
Behdad Esfahbod
43b16df8db [avar] Update test expectations 2023-03-08 11:10:07 -07:00
Behdad Esfahbod
6c35a5b65c [avar2] Always set Version during compile 2023-03-08 11:04:52 -07:00
Behdad Esfahbod
06c725388a [avar] Fix a few tests 2023-03-08 11:02:52 -07:00
Behdad Esfahbod
564dddced2 [avar2] Fix fromXML crash 2023-03-08 10:56:45 -07:00
Behdad Esfahbod
c8d32f2bb1 [avar2] Use DeltaSetIndexMap instead of VarIdxMap 2023-03-08 10:56:07 -07:00
Behdad Esfahbod
8dfad13288 [avar2] Implement toXML 2023-03-08 09:48:32 -07:00
Behdad Esfahbod
2b5686205e [avar] Support previous API in compile/decompile
Using the otData mechanism with handcoded shim.
2023-03-08 09:29:58 -07:00
Behdad Esfahbod
fd822a2602 Merge branch 'main' into avar2 2023-03-07 11:21:20 -07:00
Behdad Esfahbod
6ba1302ce4 black 2023-03-07 11:19:22 -07:00
Behdad Esfahbod
501353f3df [VarComposites] Flag rename 2023-03-06 13:10:09 -07:00
Nikolaus Waxweiler
54d6aaffb6 Guard against a ZeroDivisonError
The code was copied from ufo2ft.
2023-03-01 19:52:43 +00:00
Johannes Neumeier
29f980135a Clean up and NotImplemented as proper return value 2023-02-27 09:31:13 +02:00
Johannes Neumeier
f52b3da721 Make NameRecord comparison not fail on encoding errors #3006 2023-02-24 15:58:53 +02:00
Behdad Esfahbod
568dd0c5d4 [glyf] Support and test cubic spline 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
2d98427c99 [fvar] Black 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
0a0b152c33 [glyf] Support, and add test for, all-offcurve cubic contour 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
77e96bdcd9 [glyf_test] Add cubic test 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
82e0536beb [glyf] Support cubic curves
https://github.com/harfbuzz/boring-expansion-spec/issues/41
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
58bc16e58f
Merge pull request #2958 from fonttools/varc
VarComposites
2023-02-07 10:28:00 -07:00
Behdad Esfahbod
54a19c6b70 [VarComposite] Magic-number hygiene 2023-02-06 11:22:24 -07:00
Behdad Esfahbod
4c201b9a42 [glyf/VarComposite] Implement padding trimming 2023-02-06 11:00:05 -07:00
Behdad Esfahbod
3af9bb5976 [VarComposite] Add message to exception 2023-02-06 10:35:59 -07:00
Thatchapon Unprasert
c1509a30c4
Ensure sbix's Glyph.referenceGlyphName is set 2023-02-06 21:31:13 +07:00
Behdad Esfahbod
07bc09fb0c [VarComposites] Another fix after transform change 2023-02-04 11:48:42 -07:00
Behdad Esfahbod
51d7524a23 Revert "[ttGlyphSet] Must deep copy var components when instantiating"
This reverts commit fe6f5bd14386d0a1f546d079f1ec38e4d2414fbf.

Better fix.
2023-02-03 15:22:10 -07:00
Behdad Esfahbod
a14a02ecc2 [glyf] Fix VarComposite compile for .transform change
Ouch!
2023-02-03 13:19:37 -07:00
Behdad Esfahbod
8e981a1b28 [transform] Change the DecomposedTransform skewX sign to match Transform
Unfortunate but for consistency's sake.

This deviates from VarComposite convention.

https://github.com/fonttools/fonttools/pull/2958#issuecomment-1416155600
2023-02-03 10:23:23 -07:00
Behdad Esfahbod
2e20e47473 [transform] Rename VarTransform to DecomposedTransform 2023-02-03 09:05:55 -07:00
Behdad Esfahbod
59418656a4 [VarComposite] Add VarTransform and use 2023-02-02 14:50:26 -07:00
Behdad Esfahbod
68774ac0e6 [VarComposites] Simplify a loop as per review 2023-02-02 11:30:30 -07:00
Behdad Esfahbod
aa2e29f05f [VarComposite] Rename as per review 2023-02-02 11:00:45 -07:00
Behdad Esfahbod
700a8b36f6 [glyf] Remove leftover 2023-02-02 10:59:51 -07:00
Behdad Esfahbod
f205ba0f6c
Update Lib/fontTools/ttLib/tables/_g_l_y_f.py
Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
2023-02-01 13:22:08 -07:00