Behdad Esfahbod
e037cea726
[cython] Simplify COMPILED variables
2024-11-27 22:53:16 -07:00
Behdad Esfahbod
1d802db723
Remove qu2cu.cli from --help
2024-04-30 13:22:58 -06:00
Behdad Esfahbod
70b5456387
[cu2qu/qu2cu] Don't show benchmark module in --help
2024-04-30 13:14:07 -06:00
Behdad Esfahbod
9c52b7bfd5
[qu2cu] Add docstring to main()
...
Such that it shows up in `fonttools --help`.
2023-07-24 11:53:40 -06:00
Behdad Esfahbod
14ec21af40
[qu2cu] Micro-optimize cython
2023-04-22 12:43:33 -06:00
Behdad Esfahbod
a91c3381b5
[qu2cu] Remove division hack
2023-04-22 12:40:00 -06:00
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
690ffca963
[cu2qu.cli] Add --mixed
...
Untested.
2023-02-22 10:03:45 -07:00
Behdad Esfahbod
f53901d3f4
[qu2cu.cli] Add --all-cubic
2023-02-22 09:46:08 -07:00
Behdad Esfahbod
9073d93743
[qu2cu.cli] Always upgrade glyf table version
2023-02-22 09:28:35 -07:00
Behdad Esfahbod
e72d195583
[qu2cu] Adjust stats to match cu2qu
2023-02-22 09:18:49 -07:00
Behdad Esfahbod
5125e9e095
[qu2cu.cli] Comment
2023-02-22 09:10:03 -07:00
Behdad Esfahbod
b916c4cdae
[qu2cu.cli] Upgrade glyf table format to 1 if any cubics used
2023-02-22 09:04:12 -07:00
Behdad Esfahbod
84ba7f9618
[qu2cu.cli] Actually dump stats in --verbose
2023-02-22 09:02:15 -07:00
Behdad Esfahbod
b355b59c2c
[qu2cu] No need to add 0 to forced set
2023-02-20 21:14:04 -07:00
Behdad Esfahbod
f305e53dfc
[qu2cu] Typo
2023-02-20 18:30:20 -07:00
Behdad Esfahbod
710232f1d0
[qu2cu] Optimize using a forced set of oncurve points
...
Speeds up benchmark 12x.
2023-02-20 18:04:54 -07:00
Behdad Esfahbod
a4f4cd078c
[qu2cu.benchmark] Black
2023-02-20 17:20:06 -07:00
Behdad Esfahbod
c77ddcad45
[qu2cu.benchmark] Convert multiple quadratics splines instead of 1
...
More realistic benchmark.
2023-02-20 17:10:36 -07:00
Behdad Esfahbod
26f590ddaa
[qu2cu] Adjust comment
2023-02-20 16:22:06 -07:00
Behdad Esfahbod
7457a06c68
[qu2cu] Avoid copying curve list passed to for merge_curves
2023-02-20 16:19:30 -07:00
Behdad Esfahbod
c53933a9bc
[qu2cu] Adjust cost calculation again
...
I believe I've got it right this time. Produces slightly better output.
2023-02-20 15:24:07 -07:00
Behdad Esfahbod
03d2cd1fa5
[qu2cu] More cython annotations
...
Apparently you can even annotate variables inside generator expressions.
2023-02-20 14:12:59 -07:00
Behdad Esfahbod
5ee6cb9961
[qu2cu] Add a few more cython annotations
2023-02-20 14:04:02 -07:00
Behdad Esfahbod
c1d1386e2c
Add a few more cython annotations
2023-02-20 13:54:35 -07:00
Behdad Esfahbod
a9a6d24c6d
[qu2cu] Fix up costs setup
2023-02-20 13:26:56 -07:00
Behdad Esfahbod
d9f6b82fb9
[qu2cu] Fix optimization
...
Previous one was wrong.
2023-02-20 13:15:22 -07:00
Behdad Esfahbod
bf1ed91bde
[qu2cu] Adjust optimization
2023-02-20 13:08:14 -07:00
Behdad Esfahbod
e3d8472187
[qu2cu] Minor save a variable
2023-02-20 13:05:52 -07:00
Behdad Esfahbod
a7c9de3f50
[qu2cu] Black
2023-02-20 12:32:28 -07:00
Behdad Esfahbod
caa0c81b73
[qu2cu] Better initial condition
2023-02-20 12:25:37 -07:00
Behdad Esfahbod
94ee47c6e4
[qu2cu] Add a test and fix a bug
2023-02-20 12:22:16 -07:00
Behdad Esfahbod
789f45d4ee
[qu2cu] Improve docs
2023-02-20 10:41:13 -07:00
Behdad Esfahbod
90a2a80524
Revert "Revert "[qu2cu] Add an optimization""
...
This reverts commit eec3dca58a762cddb8f4315e2c8591ca4aecf7d4.
The optimization is correct now.
It brings down the Cythonized benchmark from 1400us to 1100us.
2023-02-20 10:31:23 -07:00
Behdad Esfahbod
68c735aa76
[qu2cu] Fix optimization
...
4 wouldn't have caused problem really but 3 is correct.
2023-02-20 10:29:48 -07:00
Behdad Esfahbod
51ed6c151f
[qu2cu] More annotation
2023-02-20 10:25:28 -07:00
Behdad Esfahbod
95692c29df
[qu2cu] Tweak annotation again
2023-02-20 10:21:12 -07:00
Behdad Esfahbod
eec3dca58a
Revert "[qu2cu] Add an optimization"
...
This reverts commit 97caa108c871522058a159a46342cedbe61a4650.
This was wrong, and made the test fail indeed. I'll think to see
if I can come up with a proper one.
2023-02-20 10:19:50 -07:00
Behdad Esfahbod
702265a760
[qu2cu] Fixup annotation
2023-02-20 10:19:21 -07:00
Behdad Esfahbod
6028fee260
[qu2cu] Rename tolerance to max_err
...
To match cu2qu.
2023-02-20 10:16:34 -07:00
Behdad Esfahbod
dd080d473a
[qu2cu] Improve docs
2023-02-20 10:15:50 -07:00
Behdad Esfahbod
97caa108c8
[qu2cu] Add an optimization
2023-02-20 10:08:33 -07:00
Behdad Esfahbod
34a3f90859
[qu2cu] Typo
2023-02-20 10:07:31 -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
f58a17d6e9
[qu2cu] Document new API
2023-02-20 09:50:52 -07:00
Behdad Esfahbod
b73ff5f171
[qu2cu] Use collections.namedtuple instead, to make cython bot happy
2023-02-20 08:45:25 -07:00
Behdad Esfahbod
837448d428
[qu2cu] Document what costs parameter is
2023-02-20 08:22:35 -07:00
Behdad Esfahbod
b3be1883c8
[qu2cu] Use NamedTuple for solution
2023-02-20 08:17:24 -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
8427e6dd18
[ttGlyphPen] Add preserveTopology=True
...
If False, perform implicit-oncurve elimination.
2023-02-18 15:45:27 -07:00