Behdad Esfahbod
bdb826fe4d
[interpolatablePlot] Ouch; and black
2023-11-20 06:39:47 -07:00
Behdad Esfahbod
6ccf29cb2f
[interpolatablePlot] Use internal cairo font face for labels
...
For more platform-independent PDF output.
2023-11-20 06:38:08 -07:00
Behdad Esfahbod
5fee01c13b
[interpolatable] Improve mixed-errors
2023-11-20 06:23:20 -07:00
Cosimo Lupo
638a16ceb8
Merge pull request #3345 from fonttools/recordingPen-draw
...
[RecordPen] Add draw() and drawPoints() as alias to replay()
2023-11-20 10:14:47 +00:00
Behdad Esfahbod
314cfeb566
[interpolatablePlot] Remove wrong assert
2023-11-19 23:20:17 -07:00
Behdad Esfahbod
2001764096
[interpolatablePlot] Draw multiple errors in the same page
2023-11-19 23:14:30 -07:00
Behdad Esfahbod
ec67af78b9
black
2023-11-19 22:57:12 -07:00
Behdad Esfahbod
47a7088139
[interpolatable] Sort problems by master pairs, not type
2023-11-19 22:56:04 -07:00
Behdad Esfahbod
79b3fcad28
black
2023-11-19 22:39:12 -07:00
Behdad Esfahbod
ffaf57f74a
[interpolatablePlot] Show multiple wrong-contour-start in one page
2023-11-19 22:37:59 -07:00
Behdad Esfahbod
dd5f34ef63
[interpolatable] Print master names before differences
2023-11-19 21:55:51 -07:00
Behdad Esfahbod
91ffbfe312
[interpolatablePlot] Fix proposed-fix for reversed contours
2023-11-19 17:55:06 -07:00
Behdad Esfahbod
4d9864beda
[interpolatablePlot] Plot fix for wrong_contour_order as well
2023-11-19 17:28:19 -07:00
Behdad Esfahbod
eacb50c57c
[interpolatablePlot] Draw fixed results for contour_order
2023-11-19 16:55:18 -07:00
Behdad Esfahbod
e894bd63c6
[interpolatablePlot] Plot midway interpolation of the problem
2023-11-19 16:36:42 -07:00
Behdad Esfahbod
6f69b21cee
[interpolatablePlot] Rename variable
2023-11-19 16:07:06 -07:00
Behdad Esfahbod
f3faff7b0d
[interpolatable] Comment
2023-11-19 15:09:38 -07:00
Behdad Esfahbod
bb29f43c46
[interpolatable] Minor speed up
2023-11-19 14:34:27 -07:00
Behdad Esfahbod
7c92b75203
[interpolatable] Use StatisticsControlPen as well
...
We use both StatisticsPen and StatisticsControlPen.
If either produced a perfect matching, we accept it.
Otherwise we use the worst score of the two.
This takes care of Kablammo[MORF].ttf and Nabla[EDPT,EHLT].ttf.
Slows down the tool, but I think it's in the right direction.
Further heuristics can be used.
2023-11-19 14:01:57 -07:00
Behdad Esfahbod
c7694d5877
[statisticsPen] Remove redundant code
2023-11-19 12:31:28 -07:00
Behdad Esfahbod
1e514fce80
[statisticsPen] Handle zero area
...
This was dropped in the previous commit.
2023-11-19 12:22:40 -07:00
Behdad Esfahbod
4eebdf4f0d
[statisticsPen] Add StatisticsControlPen
...
It uses the control box and discrete statistics instead
of using the Green's theorem.
Works better on contours that have no area.
Surprisingly, this seems to be slower than StatisticsPen.
Perhaps because MomentsPen is Cythonized.
2023-11-19 12:03:23 -07:00
Behdad Esfahbod
21864fc26a
[statisticsPen] Another bandaid
...
Sigh. I'm probably doing something wrong but I don't understand.
2023-11-19 11:09:39 -07:00
Behdad Esfahbod
0d28975708
[statisticsPen] If area=0, use control-box samples
...
Slower because we have to remember the nodes, but
more accurate. Particularly useful in varfonts
where they intentionally collapse a contour to
zero area.
2023-11-19 10:58:04 -07:00
Behdad Esfahbod
6e0b9c615f
[statisticsPen] Another bandaid :-(
2023-11-19 08:25:32 -07:00
Behdad Esfahbod
c96b56d3de
[interpolatablePlot] Draw suggested start point on the second graph
2023-11-19 07:54:14 -07:00
Behdad Esfahbod
f75d6ba2f1
[interpolatablePlot] Don't include creation date in PDF
...
Yay!
2023-11-18 17:07:32 -07:00
Behdad Esfahbod
e023a9c261
Black
2023-11-18 17:05:57 -07:00
Behdad Esfahbod
eddcb1ff52
[interpolatable] Fix drawing of reversed contour point start
2023-11-18 16:50:50 -07:00
Behdad Esfahbod
b57150b12f
[interpolatable] Whitespace
2023-11-18 16:50:50 -07:00
Behdad Esfahbod
ae747dc9d1
[interpolatable] Remove math_error
...
I've now run this scripts on hundreds of different font
families. Never hit the math_error big try. Remove it.
If something fails, it's a bug we want to get report
of and fix.
2023-11-18 13:46:42 -07:00
Behdad Esfahbod
d43617c2e3
[statisticsPen] If area is zero, report controlbox meanX/Y
...
Before we were returning all zeros.
This reduces false-positives in interpolatable.py
Three new members are also added to the pen:
sumNodesX, sumNodesY, numNodes.
2023-11-18 13:21:43 -07:00
Behdad Esfahbod
a613189471
[interpolatable] Add --output
2023-11-17 20:12:01 -07:00
Behdad Esfahbod
391dbdd433
[interpolatable] Bail early if only one glyphset
2023-11-17 19:39:57 -07:00
Behdad Esfahbod
b702043cab
[interpolatablePlot] Fix handle drawing
2023-11-17 19:01:24 -07:00
Behdad Esfahbod
2079a2a256
[interpolatable] Refactor some more code
2023-11-17 18:57:45 -07:00
Behdad Esfahbod
e12d3dd2b6
[RecordPen] Add draw() and drawPoints() as alias to replay()
...
Fixes https://github.com/fonttools/fonttools/issues/3342
2023-11-17 18:53:44 -07:00
Behdad Esfahbod
0b2af3adbe
Merge pull request #3344 from fonttools/interpolatable-refactor
...
Interpolatable refactor
2023-11-17 18:45:35 -07:00
Behdad Esfahbod
9725f0eed0
[interpolatable] Code to use angle as well in wrong_start_order vector
...
Doesn't seem to improve any of my test cases though,
so it's commented out.
2023-11-17 18:20:18 -07:00
Behdad Esfahbod
7d91dda9bd
[interpolatable] Simplify same function more
2023-11-17 17:56:38 -07:00
Behdad Esfahbod
1fd0db4ddf
[interpolatable] Simplify a function
2023-11-17 17:53:39 -07:00
Behdad Esfahbod
69e5f032d6
[interpolatable] Remove unused variable
2023-11-17 17:50:52 -07:00
Behdad Esfahbod
a06a46ff5d
[interpolatable] Rename a variable
2023-11-17 17:48:50 -07:00
Behdad Esfahbod
98f0b54a02
[interpolatable] Move some code to a function
2023-11-17 17:45:45 -07:00
Behdad Esfahbod
12387a6748
[interpolatable] Refactor common code
2023-11-17 17:41:42 -07:00
Behdad Esfahbod
ee60032e9d
[interpolatable] Minor move code around
2023-11-17 17:23:20 -07:00
Behdad Esfahbod
dea0defbe0
[interpolatable] Emphasize arch lengths more
...
Reduces false positives in Handjet from 72 to 28.
In Honk from 51 to 49.
No adverse effect detected on other fonts.
2023-11-17 17:19:44 -07:00
Behdad Esfahbod
24cb75619d
Merge pull request #3341 from fonttools/interpolatable-mst
...
Interpolatable mst
2023-11-17 17:15:14 -07:00
Behdad Esfahbod
5956a3636e
[interpolatablePlot] Don't repeat log twice for same problem
2023-11-17 16:45:33 -07:00
Behdad Esfahbod
1a7c6d402c
Merge branch 'main' into interpolatable-mst
2023-11-17 16:39:43 -07:00