-
Notifications
You must be signed in to change notification settings - Fork 682
Run shaping tests with ot funcs as well #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks Khaled! |
|
Reference mode is used to (re-)generate expected output, by passing --reference to it manually on the commandline. |
|
OK, I can restore reference mode. |
|
What's the next step here? |
|
We need to figure out why these two tests are failing, or just force ft funcs for them for now. |
|
Vertical is #537, possibly others: https://github.com/behdad/harfbuzz/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20vertical |
|
Might be nice to be able to run tests without FT as well... |
|
I know it sounds like over-engineering, but maybe I can add a --list-font-funcs to hb-view / hb-shape and we loop over them. Same about Unicode funcs perhaps. But then, we don't want to fail test suite when glib or ICU is old. |
|
For the other one, I wonder if get_contour_point is involved... |
|
get_contour_point does not seem to be called in the clusters failure, it does not seem to be related to clusters level either. May be it is fallback glyph positioning? The font does not have any layout tables… |
|
Looks like extents issue indeed: |
|
It looks like a Freetype/ft functions bug: <mtx name="uni030A" width="0" lsb="-224"/> |
|
Having |
These are CFF fonts and ot functions don’t support CFF glyph names yet. The next commit will run all tests with ot functions.
Freetype and OT font functions give different positions for some glyphs in this font (OT seems to be correct), but that is not what we are interested in in this test. See #590 (comment).
|
cc @lemzwerg |
Freetype and OT font functions give different positions for some glyphs in this font (OT seems to be correct), but that is not what we are interested in in this test. See #590 (comment).
|
Thank you Khaled! |
|
I'm a bit clueless what to check or test on the FreeType side. Please advise. |
Ok, actually not FreeType's fault. Not quite. If you run: the lsb is reported -211, but it should be -224. I looked into the font. Nothing stands out. lsb and xmin of the glyph are both -224. It's a composite glyph, has one component, but the math on that one is also correct. However, the component does have 0x4 flag bit on, which is Is there any way to disable that rounding from FreeType API? Proper fix is for |
|
For the purposes of fixing the test, we can just disable that flag. |
|
No, there is no API to disable this. What do you suggest? Maybe automatically disabling the flag if the glyph gets loaded unscaled? |
Done in #597. |
For unscaled glyph load, there is no subpixel precision so it will always be rounded. Such disabling is useful in rendering situations that support subpixel positioning. So, some way to disable it is desirable IMO. I would say if vertical hinting is disabled, then vertical position shouldn't be rounded, and if horizontal hinting is disabled (whatever affects advance width hinting), then horizontal position not rounded. |
See #590 (comment). I simply removed the composite glyph and use the referenced simple glyph directly.
This is an attempt to run all shaping tests with both ft and ot font functions, individual tests can still specify which font functions to use as before. There were a few tests using CFF fonts, these now explicitely set ft functions.
There is still a couple of failures that need investigation:
The clusters failure is especially suspicious.