10322 Commits

Author SHA1 Message Date
Behdad Esfahbod
fdc7714679 [cu2qu] Reduce benchmark conversion error
To match qu2cu's.
2023-02-18 09:46:56 -07:00
Behdad Esfahbod
0013740ab3 [qu2cu] Copy a function from cu2qu, to make Cython happy 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
f75391f461 [qu2cu] Add .benchmark module 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
ff5d758b27 [cu2qu.benchmark] Remove unused parameter 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
2a54dc5742 [qu2cu] Comment 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
3c294d17cf [qu2cu] Speed up 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
710da53b8e [qu2cu] Use a better algorithm
Dynamic-programming. Produces fewer number of curves.
2023-02-18 09:46:56 -07:00
Behdad Esfahbod
c4e3322b20 [bezier] Add a few more complex versions of functions 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
83398db061 [qu2cu] Add new module to convert quadratic to cubic Beziers 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
fd46f25ffb [bezier] Add splitCubicIntoTwoAtTC 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
cce99f00f7 [bezier] Internal variable rename 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
86c67a17b2 [bezier] Add Cython annotations 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
39b6f7a752 [bezier] Speed up cubicPointAtT 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
8dde7fef90 [bezier] Add cubicPointAtTC 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
16ee5ca195 [setup] Build misc.bezierTools with Cython 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
bf265ce49e black 2023-02-08 14:27:48 -07:00
Behdad Esfahbod
da0e859767 Fix a couple of pytest warnings 2023-02-08 14:18:49 -07:00
Behdad Esfahbod
58bc16e58f
Merge pull request #2958 from fonttools/varc
VarComposites
2023-02-07 10:28:00 -07:00
Behdad Esfahbod
a2ff670c43 [VarComposite] Adjust for RESET_UNSPECIFIED_AXES semantic change
https://github.com/harfbuzz/boring-expansion-spec/issues/81
2023-02-06 12:06:14 -07:00
Behdad Esfahbod
54a19c6b70 [VarComposite] Magic-number hygiene 2023-02-06 11:22:24 -07:00
Behdad Esfahbod
b7deb93647 Move VarComposite roundtrip tests to glyf_test 2023-02-06 11:09:11 -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
Cosimo Lupo
955a2a2437
Merge pull request #2984 from PoomSmart/patch-1
Ensure sbix's Glyph.referenceGlyphName is set
2023-02-06 16:34:15 +00:00
Behdad Esfahbod
d342440235 [pointPen] Raise AttributeError in addVarComponent 2023-02-06 08:33:30 -07:00
Behdad Esfahbod
7fdb6c23f1 [transform] Use math.copysign 2023-02-06 08:31:01 -07:00
Thatchapon Unprasert
c1509a30c4
Ensure sbix's Glyph.referenceGlyphName is set 2023-02-06 21:31:13 +07:00
Behdad Esfahbod
4355d006ad [transform] Improve DecomposedTransform
And add tests.

See thread starting at:
https://github.com/fonttools/fonttools/pull/2958#issuecomment-1416859441
2023-02-04 16:30:57 -07:00
Behdad Esfahbod
08d03a82b2 [VarComposite] Fix test font component LSB's 2023-02-04 12:28:56 -07:00
Behdad Esfahbod
0701bd5161 More VarComposite compile test 2023-02-04 11:53:21 -07:00
Behdad Esfahbod
b63f0141e4 Fix varc-6868 component lsb's 2023-02-04 11:49:30 -07:00
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