Cosimo Lupo
dfec4abf6d
glyf: use 'round' parameter in _getCoordinatesAndControls
...
as Behdad suggested in review
2023-06-08 11:47:47 +01:00
Cosimo Lupo
5c0f05cc42
allow to pass 'round' parameter in ttGlyphPen, optimize for noRound
2023-06-08 11:41:07 +01:00
Cosimo Lupo
86777525a6
drop oncurve if it's impliable either before OR after rounding
...
ofter the rounding gives us an opportunity to make an oncurve impliable, for points that were not equidistant become so after round, so why not take it!
2023-06-07 18:13:58 +01:00
Cosimo Lupo
1ca554332c
_getCoordinatesAndControls: make sure coords are rounded toInt() as gvar expects
...
ufo2ft will no longer send varLib already-rounded master glyf tables (to give it an opportunity to compute implied oncurves on the pre-rounded coords) so when retrieving coordinates off the glyf table in order to compute gvar deltas we have to round
2023-06-07 18:05:48 +01:00
Cosimo Lupo
0761508510
must update start = last + 1 in dropImpliedOnCurvePoints
...
Fixes #3155
2023-06-06 17:01:40 +01:00
Cosimo Lupo
5b93100616
also check endPtsOfContours in dropImpliedOnCurvePoints
...
as per review https://github.com/fonttools/fonttools/pull/3147#discussion_r1214708207
Also, don't do same work multiple times when dropping points from flags/endPtsOfContours arrays since these are supposed to be the same for all interpolatable glyphs
2023-06-05 12:11:17 +01:00
Cosimo Lupo
6a276d9f6a
dropImpliedOnCurvePoints: raise if incompatible, skip empty/composites
2023-06-02 13:51:28 +01:00
Cosimo Lupo
3b62811b63
have dropImpliedOnCurvePoints return the set of point indices useful for testing
2023-06-01 18:21:59 +01:00
Cosimo Lupo
e19871981d
add docstring to dropImpliedOnCurvePoints function
2023-06-01 16:49:30 +01:00
Cosimo Lupo
b7f4e9b83e
move dropImpliedOnCurvePoints function to glyf table module
...
so it can be used by client code on multiple glyf Glyph objects regardles of TTGlyphPen
2023-06-01 16:49:29 +01:00
Jens Kutilek
85c80be6b6
Fix missing composite instructions in ttx ( #3092 )
...
* Fix calculation of haveInstructions
* Add test
2023-04-25 16:21:24 +02:00
Behdad Esfahbod
501353f3df
[VarComposites] Flag rename
2023-03-06 13:10:09 -07:00
Behdad Esfahbod
568dd0c5d4
[glyf] Support and test cubic spline
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
82e0536beb
[glyf] Support cubic curves
...
https://github.com/harfbuzz/boring-expansion-spec/issues/41
2023-02-21 13:01:49 -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
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
Behdad Esfahbod
7db21cd197
[VarComposite] Link to spec
2023-01-31 11:30:47 -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
Behdad Esfahbod
e0a6bdf79e
[glyf/VarComposites] raise NotImplementedError in getCoordinates
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
9475dccbea
[glyf/VarComposites] Hook up setCoordinates()
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
68682aa833
[glyf/VarComposites] Allow in maxp function
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
d32650b58d
[glyf/VarComposite] Implement subsetting
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
baf302d0cf
[glyf/VarComposite] Add a NotImplementedError
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
792ebb7a35
[glyf/VarComposite] Adjust UNIFORM_SCALE
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
a80f21fa23
[glyf/VarComposite] Automatically handle UNIFORM_SCALE
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
ee4437adf0
[glyf/VarComposite] Comment
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
f2c0b25f4c
[glyf/VarComponent] Missing line
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
1c8741a2ca
[glyf/VarComponent] Add setCoordinates
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
8a2e918bae
[glyf] Black
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
dbecf6dc02
[glyf/VarComponent] Move code around
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
817362a049
[glyf/VarComponent] Fix control data
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
1d39fa03ab
[glyf] Handle case of missing fvar table
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
621767dbee
[glyf/VarComponent] Use axis tags for location
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
32fa4df276
[glyf/VarComponent] Calculate flags at compile() if missing
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
094a08a3bf
[glyf] Remove fvar dependency again
...
Can't use it since Glyph.expand() API does not take font.
2023-01-30 11:26:20 -07:00