silnrsi / smith

font development, testing and release
Other
14 stars 5 forks source link

`smith test` gives false failures when ftml includes `rtl='True'` #84

Closed bobh0303 closed 6 months ago

bobh0303 commented 6 months ago

With identical ttf files in results/ and references/, smith test does not necessarily generate empty .html files in results/tests for ftml tests. What seems to trigger the failure is when a given ftml test record includes rtl='True' attribute.

As a short example, I've committed to Lateef a tests/DirTest.ftml that has two test strings that are the same except for label and direction:

  <testgroup>
    <test label="b-l-m  RTL" rtl="True">
      <string>\u0628\u0644\u0645 </string>
    </test>
    <test label="b-l-m  LTR">
      <string>\u0628\u0644\u0645 </string>
    </test>
  </testgroup> 

As you can see on Team City:

image

the RTL test indicates a regression failure but shouldn't.

bobh0303 commented 6 months ago

This turns out to have been a bug in palaso-python's cmptextrender, and was fixed by commits https://github.com/silnrsi/palaso-python/commit/e8af5851aaa54017c46fa73f74a1f679a1d882d6 and https://github.com/silnrsi/palaso-python/commit/271e0cb5922d1d88da98a9b3986c148251cc1e99 earlier today.