316 Commits

Author SHA1 Message Date
Cosimo Lupo
0df4997661
prevent cython.compiled raise AttributeError if cython not properly installed
It's possible sometimes that 'import cython' does not fail but then 'cython.compiled' raises AttributeError.
It actually happened in our internal production environment...

Similar issue to https://github.com/pydantic/pydantic/pull/573 and https://github.com/ipython/ipython/issues/13294
2023-03-02 17:43:38 +00:00
Behdad Esfahbod
e72d195583 [qu2cu] Adjust stats to match cu2qu 2023-02-22 09:18:49 -07:00
Behdad Esfahbod
8f89a435ac [ttGlyphPen] Rename preserveTopology to dropImpliedOnCurves 2023-02-22 09:08:39 -07:00
Behdad Esfahbod
7580fc7e24 [cu2quPen] Remove unnecessary check 2023-02-22 07:44:13 -07:00
Cosimo Lupo
c7fa0e6f26
Cu2QuPointPen: minor refactoring of _drawPoints method 2023-02-22 12:03:04 +00:00
Behdad Esfahbod
58f9245115 [ttGlyphPen] Refactor code into function 2023-02-21 21:16:27 -07:00
Behdad Esfahbod
9c60b86b46 [cu2quPen] Add all_quadratic=True 2023-02-21 14:52:15 -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
41732b5904 [qu2cu] Use math.isclose 2023-02-20 12:02:09 -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
efed2550be [qu2cu_pen] Respect all_cubic for oncurveless curves 2023-02-20 09:10:07 -07:00
Behdad Esfahbod
336cfc3e8f [qu2cu_pen] Respect all_cubic 2023-02-20 09:05:58 -07:00
Behdad Esfahbod
8427e6dd18 [ttGlyphPen] Add preserveTopology=True
If False, perform implicit-oncurve elimination.
2023-02-18 15:45:27 -07:00
Behdad Esfahbod
84cd10d666 [qu2cuPen] Don't add implicit points for cubics
We can't since that would be interpretted as a superBezier.
2023-02-18 09:46:56 -07:00
Behdad Esfahbod
86aff322b9 [qu2cuPen] Drop quadratic implicit oncurves too 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
c11682ca85 [qu2cuPen] Drop cubic implicit oncurves 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
ea8ae8f399 Black 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
ceae682246 [qu2cu] Add all_cubic parameter 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
1a10b05c99 [qu2cuPen] Process multiple qCurveTo's at a time 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
8c88184413 [qu2cuPen] Support quadratic splines with no on-curve 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
e3f7154a9d [qu2cuPen] Keep quadratics if more economical
Perhaps the pen should have a setting for this.
2023-02-18 09:46:56 -07:00
Behdad Esfahbod
b221f867df [qu2cu] Add cli.py that converts TTFs to cubic glyf1 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
92e3433589 [pens] Add qu2cuPen.py 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
2b9be6eca1 [Cu2QuMultiPen] Add TODO 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
ac94ee9949 [Cu2QuPen] Use FilterPen 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
e18fca76ef [filterPen] Add current_pt 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
847ce2866e
reverseContourPen: fix duplicate lineTo when outputImpliedClosingLine=True 2023-02-17 17:07:24 +00:00
Behdad Esfahbod
d342440235 [pointPen] Raise AttributeError in addVarComponent 2023-02-06 08:33:30 -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
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
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
Cosimo Lupo
c30a6355ff
Merge pull request #2925 from fonttools/blacken-code
Blacken code
2022-12-14 18:53:35 +00:00
Behdad Esfahbod
78a939848f [Cu2QuMultiPen] Add tests and fix a but
Fixes https://github.com/fonttools/fonttools/issues/2926
2022-12-13 11:28:33 -07:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Behdad Esfahbod
4f3cb7e4bc [cu2quPen] Add Cu2QuMultiPen 2022-12-12 09:55:12 -07:00
Behdad Esfahbod
78e10d8b42 [ttGlyphPen] Add outputImpliedClosingLine argument
Fixes https://github.com/fonttools/fonttools/issues/2913
2022-12-12 09:53:59 -07:00
Behdad Esfahbod
ddbbef2257 [reverseContourPen] Add outputImpliedClosingLine
Fixes https://github.com/fonttools/fonttools/issues/2914
2022-12-12 09:49:06 -07:00
Behdad Esfahbod
73923b3a1e Typo 2022-12-07 15:19:07 -07:00
Behdad Esfahbod
f379aced4d [svgPathPen] Don't close path in endPath()
Fixes https://github.com/fonttools/fonttools/issues/2089
2022-10-26 14:36:22 -06:00
Behdad Esfahbod
78f12ab12d [pens] Add cairoPen 2022-08-24 09:40:17 -06:00
Behdad Esfahbod
5674a0bfc8 [svgPathPen] Document coordinate system
Fixes https://github.com/fonttools/fonttools/issues/2388
2022-08-20 11:00:49 -06:00
Behdad Esfahbod
8ad260d33d [svgPathPen] Make it show in fonttools --help 2022-08-18 07:43:28 -06:00
Behdad Esfahbod
33d51f52a7 [svgPathPen] Accept --variations 2022-08-14 12:08:12 -06:00