silnrsi / palaso-python

Payap Linguistic Institute Computing Unit python packages
MIT License
3 stars 4 forks source link

`cmptxtrender` identifies differences when comparing a font file with itself #13

Open bobh0303 opened 5 months ago

bobh0303 commented 5 months ago

In the following "regression" style test, cmptxtrender is asked to compare rendering of a font file with that of the same font file, but it reports differences:

$ cd font-scheherazade/references/4.000
$ cmptxtrender -e ot -e ot -s "arab" -l "" -t "../../tests/AllChars-auto.ftml" --outputtype json -g ../../source/glyph_data.csv "ScheherazadeNew-Regular.ttf" "ScheherazadeNew-Regular.ttf"
{
"U+060C" : [[["comma-ar.downward", 0.0, 0.0], ["_adv_", 929.0, 0.0]], [["comma-ar", 0.0, 0.0], ["_adv_", 929.0, 0.0]]],
"U+061B" : [[["semicolon-ar.downward", 0.0, 0.0], ["_adv_", 929.0, 0.0]], [["semicolon-ar", 0.0, 0.0], ["_adv_", 929.0, 0.0]]],
"":[]}
$

NB: This failure was seen in Sch project as a result of smith test which was comparing rendering of results/*.ttf with corresponding fonts in references/, so passing the same font file as the two arguments to cmptxtrender is not the issue, but is done here to make it easier to replicate and possibly debug.

bobh0303 commented 5 months ago

Observations:

bobh0303 commented 5 months ago

A short ftml file that demonstrates the problem .... just remove the .txt extension first. short.ftml.txt