240 Commits

Author SHA1 Message Date
Behdad Esfahbod
42db614679 [interpolatable] Add --show-all
Helpful debugging false-negatives.
2023-11-20 16:19:28 -07:00
Behdad Esfahbod
c6e24b23ef [interpolatable] Add input names to any raised exception
When I'm running 24 instances at a time, it has been
impossible to know which font threw an exception...
2023-11-20 12:03:53 -07:00
Behdad Esfahbod
74fe7791ea [interpolatable] Include cross-product in the wrong_start mix
Reduces false-positives.
2023-11-20 11:56:13 -07:00
Behdad Esfahbod
51e70f9742
[interpolatable] Return master indices in addition to master names (#3346)
[interpolatable] Add master indices to problem reports

More solid than using names to refer back to the master index,
as needed in interpolatablePlot.
2023-11-20 08:59:11 -07:00
Behdad Esfahbod
82f44a6b45 black 2023-11-20 07:38:39 -07:00
Behdad Esfahbod
e1cf7b7ba6 [interpolatable] Improve mixed-error resolution
Test with:

anektamil/AnekTamil\[wdth\,wght\].ttf --glyphs guillemotleft
cairo/cairo/Cairo\[slnt\,wght\].ttf --glyphs threedotsdownbelowar.color0
adventpro/AdventPro-Italic\[wdth\,wght\].ttf --glyphs uni2116
2023-11-20 07:33:27 -07:00
Behdad Esfahbod
5fee01c13b [interpolatable] Improve mixed-errors 2023-11-20 06:23:20 -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
dd5f34ef63 [interpolatable] Print master names before differences 2023-11-19 21:55:51 -07:00
Behdad Esfahbod
4d9864beda [interpolatablePlot] Plot fix for wrong_contour_order as well 2023-11-19 17:28:19 -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
c96b56d3de [interpolatablePlot] Draw suggested start point on the second graph 2023-11-19 07:54:14 -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
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
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
1a7c6d402c Merge branch 'main' into interpolatable-mst 2023-11-17 16:39:43 -07:00
Behdad Esfahbod
cef1d8dc41 [interpolatable] Skip wrong_start_order test if node counts differ 2023-11-17 16:34:11 -07:00
Behdad Esfahbod
15819341bb [interpolatable] Include polygon lengths in wrong_start_order test
Brings down fals-positives. See:
https://github.com/fonttools/fonttools/pull/3341#issuecomment-1817204140
2023-11-17 15:33:42 -07:00
Behdad Esfahbod
17b3f33957 [interpolatable] Fix tests 2023-11-17 15:22:03 -07:00
Behdad Esfahbod
ec812b23f8 [interpolatable] Fix a bug 2023-11-17 15:12:27 -07:00
Behdad Esfahbod
0cf9583137 [interpolatable] Remove parent-skipping
Otherwise we still get the same high number of reports (500+!)
for Handjet and Honk. With this, they are down in the 100s.
2023-11-17 14:22:55 -07:00
Behdad Esfahbod
5144047233 [interpolatable] Black 2023-11-17 14:21:51 -07:00
Behdad Esfahbod
11da18a577 [interpolatable] Log 2023-11-17 14:21:34 -07:00
Behdad Esfahbod
b510c9413c [interpolatable] Don't actually reorder glyphsets
Since that would throw off the reporting numbers.

Just process them in the desired order.
2023-11-17 14:20:26 -07:00
Behdad Esfahbod
15d33e88b8 [interpolatable] Skip double-reporting in the tree
If a master has problem, skip over it when finding grand_parent.
2023-11-17 13:38:20 -07:00
Behdad Esfahbod
a4a65a831f [interpolatable] Reorder masters in a partial sort order
By parents. Such that all childs of a parent come after it.
2023-11-17 13:31:28 -07:00
Behdad Esfahbod
a2a939ebad [interpolatable] Compare masters according to minimum-distance-tree
To be tested more.
2023-11-17 13:16:26 -07:00
Behdad Esfahbod
9c08d9bb68 [interpolatale] Fix tests 2023-11-17 10:33:38 -07:00
Behdad Esfahbod
7c72a2ee02 [interpolatable] Always put base master first
Warn if we could not find the base master ;-(.
2023-11-16 23:01:59 -07:00
Behdad Esfahbod
647bd27ed5 [interpolatable] Collect master locations and axis triples 2023-11-16 23:01:43 -07:00
Behdad Esfahbod
73fe1422ca [interpolatable] Use designspace from Glyphs file 2023-11-16 20:25:40 -07:00
Behdad Esfahbod
c430aa4f99 [interpolatable] Align-center the HTML output 2023-11-16 18:54:58 -07:00