10491 Commits

Author SHA1 Message Date
Behdad Esfahbod
07bc09fb0c [VarComposites] Another fix after transform change 2023-02-04 11:48:42 -07:00
Behdad Esfahbod
e3a37f07bf Add test for previous commit 2023-02-03 15:29:32 -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
Just van Rossum
fe6f5bd143 [ttGlyphSet] Must deep copy var components when instantiating 2023-02-03 23:13:41 +01:00
Behdad Esfahbod
07096d4af4 Add test for compile/decompile toXML/fromXML of VarComposites 2023-02-03 14:24:25 -07:00
Behdad Esfahbod
fcc4f379fb [ttGlyphSet] Don't apply lsb-xMin shift to components
This matches HarfBuzz, FreeType, and Windows.

Fixes https://github.com/fonttools/fonttools/issues/2981
2023-02-03 13:55:31 -07:00
Behdad Esfahbod
e374af919d [ttGlyphSet] Only decompose VarComposites on AttributeError
Keep NotImplementedError for clients to really say don't want it.
2023-02-03 13:35:09 -07:00
Behdad Esfahbod
a14a02ecc2 [glyf] Fix VarComposite compile for .transform change
Ouch!
2023-02-03 13:19:37 -07:00
Behdad Esfahbod
df43ae3684 [basePen] Add addVarComposite() to DecomposingPen
Also change AbstractPen's.
2023-02-03 12:37:40 -07:00
Behdad Esfahbod
11b2427f61 [pointPen] Add addVarComponent to GuessSmoothPointPen 2023-02-03 11:19:04 -07:00
Behdad Esfahbod
284f97670b [recordingPen] Record VarComponents in RecordingPointPen 2023-02-03 11:06:56 -07:00
Behdad Esfahbod
fbf09fb24d [ttGlyphSet_test] Test that RecordingPointPen records VarComposite 2023-02-03 11:03:04 -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
c0d100f7e8 [transform] Add DecomposedTransform.fromTransform() 2023-02-03 10:06:47 -07:00
Behdad Esfahbod
cf9dece8f2 [transform] Add Transform.toDecomposed() 2023-02-03 09:55:00 -07:00
Behdad Esfahbod
a1907cfd4d [transform] Add DecomposedTransform tests 2023-02-03 09:42:04 -07:00
Behdad Esfahbod
bdbc53b689 [transform] Document DecomposedTransform 2023-02-03 09:37:11 -07:00
Behdad Esfahbod
89aeff636c [transform] Fix mishap 2023-02-03 09:14:08 -07:00
Behdad Esfahbod
2e20e47473 [transform] Rename VarTransform to DecomposedTransform 2023-02-03 09:05:55 -07:00
Behdad Esfahbod
96f602cf3c [transform] Use dataclass for VarTransform 2023-02-03 09:03:19 -07:00
Behdad Esfahbod
249d9248eb [ttGlyphSet/VarComposite] Accept AttributeError as well 2023-02-03 08:59:32 -07:00
Behdad Esfahbod
4ce383f167 [ttGlyphSet] Consolidate two branches 2023-02-03 08:58:16 -07:00
Just van Rossum
bc19f42c0f [ttGlyphSet] fix indentation so it works for point pens, too 2023-02-03 16:36:40 +01:00
Behdad Esfahbod
69966aa5d7 [BasePen] Add addVarComponent() 2023-02-02 15:25:09 -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
05da0ac1b5 [VarComposites] Handle missing transform attributes during drawing 2023-02-02 11:28:36 -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
69d56c3104 [VarComposite] Use math.radians as per review 2023-02-02 10:58:58 -07:00
Behdad Esfahbod
f3f50393a8 [ttGlyph] Adjust contextmanager pattern 2023-02-02 10:52:31 -07:00
Cosimo Lupo
68ab25b88a
Merge pull request #2978 from fonttools/redrop-py37
Drop Python3.7, require 3.8+
2023-02-02 15:58:20 +00:00
Cosimo Lupo
7f4fe17e5b
Drop Python3.7, require 3.8+
Revert "Revert "Merge pull request #2879 from fonttools/drop-py37""

This reverts commit f21e6768a7e970e3ec0f3c4b818f47f8dfd1c92b.

Which in turn, reverted https://github.com/fonttools/fonttools/pull/2879
2023-02-02 15:34:11 +00:00
Behdad Esfahbod
e07fafc324 [scaleUpem_test.py] Scale other varComposite font as well
Just because it's there.
2023-02-01 19:06:10 -07:00
Behdad Esfahbod
2c2a0964d7 [ttGlyphSet_test] Add another varComposite test
This one has different characteristics, hitting more code.
2023-02-01 18:56:31 -07:00
Behdad Esfahbod
1d072aa30e [scaleUpem_test] Also test readint varComposite XML
Easiest place to test it. I know...
2023-02-01 18:39:20 -07:00
Behdad Esfahbod
f3dd3fb48f [ttGlyphSet_test] Use variations in varComposite test
To hit more code with test.
2023-02-01 18:31:54 -07:00
Behdad Esfahbod
0e9efae0d5 [VarComposite] Use contextmanager as per review 2023-02-01 14:17:24 -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
Behdad Esfahbod
b821141eb7 [interpolatable_test] Test VarComposite 2023-01-31 13:44:20 -07:00
Behdad Esfahbod
0f1eb4673c [instancer_test] Add varComposite test 2023-01-31 13:25:06 -07:00
Behdad Esfahbod
6755acceee [woff2] Add fvar to glyf dependencies
Since the VarComposites added fvar to glyf dependencies in ttLib.

Add test for VarComposite to woff2 tests.
2023-01-31 12:46:17 -07:00
Behdad Esfahbod
7db21cd197 [VarComposite] Link to spec 2023-01-31 11:30:47 -07:00
Behdad Esfahbod
b657b309e9 [Tests/subset/VarComposite] Add test 2023-01-30 11:26:21 -07:00
Behdad Esfahbod
63d355e37d [Tests/ttGlyphSet/VarComposite] Add test
And a bugfix.
2023-01-30 11:26:21 -07:00
Behdad Esfahbod
f2cf4eea73 [Tests/scaleUpem/VarComposite] Add test 2023-01-30 11:26:21 -07:00
Behdad Esfahbod
4310512f07 [ttGlyphSet/VarComposite] Add VarComponentFlags.RESET_UNSPECIFIED_AXES 2023-01-30 11:26:21 -07:00
Behdad Esfahbod
8ac23b2209 [VarComposite/compile] Better flags computation 2023-01-30 11:26:21 -07:00
Behdad Esfahbod
38bbbf7fbc [VarComposites/compile] Better uniform-scale check 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
d8f6d0c6af [ttx/VarComposite] Limit fractional bits when reading/writing 2023-01-30 11:26:20 -07:00