1613 Commits

Author SHA1 Message Date
Behdad Esfahbod
dabd07e3cc [ttGlyphPen_test] Add one more test 2023-02-22 08:53:35 -07:00
Behdad Esfahbod
a32118a19f [ttGlyphPen_test] Add test with two contours
To exercise the remaining lines of ttGlyphPen.
2023-02-22 08:44:15 -07:00
Behdad Esfahbod
303eeeeec5 [ttGlyphPen_test] Parametrize test 2023-02-22 08:41:14 -07:00
Behdad Esfahbod
bbdee18f67 [ttGlyphPen_test] Exercise preserveTopology 2023-02-22 07:57:37 -07:00
Behdad Esfahbod
68bfd99da0 [ttGlyphPen_test] Exercise preserveTopology=False
Still wouldn't exercise non-empty drop codepath.
2023-02-22 07:43:14 -07:00
Behdad Esfahbod
5e141f027b [cubic-glyf] Add test for offcurve wrap-around and all-offcurve 2023-02-21 16:52:36 -07:00
Behdad Esfahbod
9c60b86b46 [cu2quPen] Add all_quadratic=True 2023-02-21 14:52:15 -07:00
Behdad Esfahbod
a21b71ef01 [cu2qu] Add all_quadratic=True parameter
If set to False, then either a single quadratic or a single cubic
is returned.
2023-02-21 13:14:01 -07:00
Behdad Esfahbod
9e40409094 [woff2] Support cubic curves as untransformed glyph table 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
568dd0c5d4 [glyf] Support and test cubic spline 2023-02-21 13:01:49 -07:00
Behdad Esfahbod
9df8e6dd64 Add missing test file 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
24e798da95 [ttGlyphPen] Add tests for cubic glyf 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
085b489012 [qu2cuPen] Change stats
To count number of quadratic vs cubic segments.
2023-02-21 13:01:41 -07:00
Behdad Esfahbod
94ee47c6e4 [qu2cu] Add a test and fix a bug 2023-02-20 12:22:16 -07:00
Behdad Esfahbod
f87a897c7f
Merge pull request #2993 from fonttools/qu2cu
qu2cu
2023-02-20 11:04:48 -07:00
Behdad Esfahbod
d0896ac296 [qu2cu] Simplify API
Drop the one that was special-case of the other.
2023-02-20 10:03:30 -07:00
Behdad Esfahbod
77d25b332e [qu2cu] Add test for oncurveless contour 2023-02-20 08:58:29 -07:00
Behdad Esfahbod
f1086ddb65 [qu2cu] Produce optimal mix of cubic/quadratic splines
Yay. Finally!
2023-02-18 16:36:43 -07:00
Behdad Esfahbod
3534b59631 [qu2cu] Add pen tests 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
f32df5a418 [cu2quPen_test] Remove redundant test 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
f726ac6bbb [qu2cu] Call main() from tests
For coverage
2023-02-18 09:46:56 -07:00
Behdad Esfahbod
701a75c74a [qu2cu] Add roundtrip test 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
e76f962883 [qu2cu] Add test 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
ac94ee9949 [Cu2QuPen] Use FilterPen 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
64bce6fc9b [cu2quPen] Remove deprecated ignore_single_points 2023-02-18 09:46:56 -07:00
Cosimo Lupo
4f486ad92e
no need to massage expected test_reverse_point_pen 2023-02-17 16:56:14 +00:00
Cosimo Lupo
b64b41f645
add additional tests for outputImpliedClosingLine 2023-02-17 16:56:14 +00:00
Cosimo Lupo
a42b77bd8f
reverseContourPen_test: parametrize all existing tests with outputImpliedClosingLine 2023-02-17 15:35:18 +00:00
Cosimo Lupo
81279d2ed6
reverseContourPen_test: check outputImpliedClosingLine works as expected
I looked at this again and got suspicious becuase I noticed that the number of pen commands increased from 4 to 6, whereas I only expected it to be 5 (4+1) in the outputImpliedClosingLine=True case.

Turns out we are adding an extra duplicate lineTo right after moveTo, which I think is not correct.
2023-02-17 15:02:59 +00: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
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
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
e3a37f07bf Add test for previous commit 2023-02-03 15:29:32 -07:00
Behdad Esfahbod
07096d4af4 Add test for compile/decompile toXML/fromXML of VarComposites 2023-02-03 14:24:25 -07:00
Behdad Esfahbod
fbf09fb24d [ttGlyphSet_test] Test that RecordingPointPen records VarComposite 2023-02-03 11:03:04 -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
2e20e47473 [transform] Rename VarTransform to DecomposedTransform 2023-02-03 09:05:55 -07:00
Behdad Esfahbod
69966aa5d7 [BasePen] Add addVarComponent() 2023-02-02 15:25:09 -07: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