354 Commits

Author SHA1 Message Date
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
Behdad Esfahbod
6df779fd5d [svgPen] Add main that prints SVG for input text 2022-08-13 15:23:10 -06:00
Behdad Esfahbod
52b28f9022 [statisticsPen] Avoid division-by-zero 2022-08-12 14:00:27 -06:00
Behdad Esfahbod
97df4a130c [symfont/momentsPen] Cythonize greenPen / momentsPen
Makes varLib.interpolatable 3x faster.
2022-07-28 15:35:51 -06:00
Behdad Esfahbod
22fd6f3eeb [momentsPen] Remove manual editions
Move OpenContourError to basePen.
2022-07-28 14:01:31 -06:00
Behdad Esfahbod
4139d8914a [statisticsPen] By default report all glyphs 2022-07-12 16:39:56 -06:00
Takaaki Fuji
5f2c492635 freetypePen: format code with Black 2022-01-31 20:56:03 +09:00
Takaaki Fuji
48cbe7b054 freetypePen: prefer FT_CURVE_TAG enums 2022-01-31 20:55:33 +09:00
Takaaki Fuji
cd5c16f4d4 freetypePen: cosmetic changes 2022-01-31 18:08:51 +09:00
Takaaki Fuji
9eadd908c6 freetypePen: fix bits for cubic on-curve 2022-01-31 18:08:51 +09:00
Takaaki Fuji
e1c3cdcfde freetypePen: raise PenError when missing moveTo 2022-01-31 18:08:51 +09:00
Takaaki Fuji
a27789c477 freetypePen: handle rotate/skew transform
The pen is designed to determine the bitmap size when omitted, which
helps users to see an image somehow even when they have no idea how the
arguments should be passed. And I realised that I didn't give enough
thought to rotate/skew transforms in former PRs. This commit fixes the
calculation of the bbox after transformation. Also tries to clear up how
the autosizing options work in the docstring.

Some minor fixes will follow.
2022-01-31 18:08:51 +09:00
Takaaki Fuji
a7e330aa83 Revert "Raise ImportError in __init__"
This reverts commit 24d356da25a148c63c78c461a8ccc7e632371ca4.
2022-01-13 18:59:47 +09:00