https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Bug ID: 1853937 Summary: Inconsistent rendering of ti, tt ligatures Product: Fedora Version: 32 Status: NEW Component: lato-fonts Assignee: pikachu.2014@gmail.com Reporter: james@ettle.org.uk QA Contact: extras-qa@fedoraproject.org CC: fonts-bugs@lists.fedoraproject.org, pikachu.2014@gmail.com, piotr1212@gmail.com Target Milestone: --- Classification: Fedora
Created attachment 1699956 --> https://bugzilla.redhat.com/attachment.cgi?id=1699956&action=edit Sample renderings
The horizontal 't-crossing' strokes of the ti and tt ligatures are rendered slightly below the x-height, in a manner that is more- or less-visible depending on font size. It's most visible at 11pt.
Attached are samples rendered with RGB subpixel anti-aliasing, slight hinting. The issue is visible in the 8, 11 and 14pt samples.
lato-fonts-2.015-9.fc32.noarch freetype-2.10.1-2.fc32.x86_64
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Alexei Podtelezhnikov apodtele@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |apodtele@gmail.com
--- Comment #1 from Alexei Podtelezhnikov apodtele@gmail.com --- For completeness sake, please add add "f" and "t" to your images.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment|0 |1 #1699956 is| | obsolete| |
--- Comment #2 from James james@ettle.org.uk --- Created attachment 1715542 --> https://bugzilla.redhat.com/attachment.cgi?id=1715542&action=edit Sample renderings
Updated as requested
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #3 from James james@ettle.org.uk --- (In reply to James from comment #2)
Created attachment 1715542 [details] Sample renderings
Updated as requested
Hold on, ignore those, I had the ligatures turned off...
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment|0 |1 #1715542 is| | obsolete| |
--- Comment #4 from James james@ettle.org.uk --- Created attachment 1715546 --> https://bugzilla.redhat.com/attachment.cgi?id=1715546&action=edit sample renderings updated per request
...this time with the ligatures.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #5 from Alexei Podtelezhnikov apodtele@gmail.com --- Curiously, the ligatures outside of Unicode are the ones loaded without hinting. Which program is this? I do not see the issue with ftview from freetype-demos.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #6 from James james@ettle.org.uk --- The samples are all screenshots from the sample area a Gtk3 font selection box -- such as you can get e.g. in Gedit.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #7 from Alexei Podtelezhnikov apodtele@gmail.com --- The glyphs are hinted in the font. It must be Pango which loads them unhinted (FT_LOAD_NO_HINTING). Please reassign to Pango.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |caillon+fedoraproject@gmail | |.com, | |gnome-sig@lists.fedoraproje | |ct.org, | |i18n-bugs@lists.fedoraproje | |ct.org, | |john.j5live@gmail.com, | |mclasen@redhat.com, | |pwu@redhat.com, | |rhughes@redhat.com, | |rstrode@redhat.com, | |sandmann@redhat.com, | |tagoh@redhat.com Component|lato-fonts |pango Summary|Inconsistent rendering of |ti, tt ligatures (of at |ti, tt ligatures |least Lato font) loaded | |without hinting
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #8 from James james@ettle.org.uk --- (In reply to Alexei Podtelezhnikov from comment #7)
The glyphs are hinted in the font. It must be Pango which loads them unhinted (FT_LOAD_NO_HINTING). Please reassign to Pango.
Done. I've changed the title -- does this accurately summarise the situation?
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Comment|0 |updated
--- Comment #0 has been edited ---
Created attachment 1699956 --> https://bugzilla.redhat.com/attachment.cgi?id=1699956&action=edit Sample renderings
The horizontal 't-crossing' strokes of the ti and tt ligatures are rendered slightly below the x-height, in a manner that is more- or less-visible depending on font size. It's most visible at 11pt.
Attached are samples rendered with RGB subpixel anti-aliasing, slight hinting. The issue is visible in the 8, 11 and 14pt samples.
lato-fonts-2.015-9.fc32.noarch freetype-2.10.1-2.fc32.x86_64
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Peng Wu pwu@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #9 from Peng Wu pwu@redhat.com --- Could you provide the expected result?
And how do you produce the sample image?
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #10 from James james@ettle.org.uk --- Created attachment 1715700 --> https://bugzilla.redhat.com/attachment.cgi?id=1715700&action=edit My fonts.conf
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #11 from James james@ettle.org.uk --- Created attachment 1715702 --> https://bugzilla.redhat.com/attachment.cgi?id=1715702&action=edit Large point-size expected result (generated in Inkscape)
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment|sample renderings updated |Sample renderings in Gtk3 #1715546|per request |font chooser, at 8, 9, 10, description| |11 and 14 pt
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #12 from James james@ettle.org.uk --- (In reply to Peng Wu from comment #9)
Could you provide the expected result?
And how do you produce the sample image?
The sample image was produced by taking screenshots from a Gtk3 font chooser. fonts.conf attached. Using RGB subpixel anti-aliasing with slight hinting.
The expected result is what's seen in the 9pt and 10pt samples: the horizontal stroke of the ti and tt ligatures lines up with that of a single t. Note in the 8pt, 11pt and 14pt samples the horizonal stroke on the ligature is a pixel or so below that on the single t.
I've also attached a rendering of "t ti tt" at large point-size rendered in Inkscape, just to confirm that the glyphs' horizontal strokes do align geometrically.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Peng Wu pwu@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(james@ettle.org.u | |k)
--- Comment #13 from Peng Wu pwu@redhat.com --- Could you use pango-view to produce the actual result?
And use ftview to produce the expected result for comparison.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #14 from Akira TAGOH tagoh@redhat.com --- easy to reproduce with this: pango-view --markup -t "<span font_desc='Lato 8'>8pt t ti fi tt</span>^M<span font_desc='Lato 9'>9pt t ti fi tt</span>^M<span font_desc='Lato 10'>10pt t ti fi tt</span>^M<span font_desc='Lato 11'>11pt t ti fi tt</span>^M<span font_desc='Lato 14'>14pt t ti fi tt</span>"
and
ftview -e unic -m "t ti fi tt" -k5 14 /usr/share/fonts/lato/Lato-Regular.ttf
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #15 from Akira TAGOH tagoh@redhat.com --- Created attachment 1720101 --> https://bugzilla.redhat.com/attachment.cgi?id=1720101&action=edit Actual result with the helping line
This would demonstorate the issue
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(james@ettle.org.u | |k) |
--- Comment #16 from James james@ettle.org.uk --- Created attachment 1720732 --> https://bugzilla.redhat.com/attachment.cgi?id=1720732&action=edit Rendering from pango-view --markup
Provided in part fulfilment of the NEEDINFO. This is with pango-1.47.0-1.fc33.x86_64.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #17 from James james@ettle.org.uk --- (In reply to Akira TAGOH from comment #14)
ftview -e unic -m "t ti fi tt" -k5 14 /usr/share/fonts/lato/Lato-Regular.ttf
When I tried this, it didn't use the ligatures -- not sure how to make them show up as some of these are non-Unicode ligatures.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #18 from Akira TAGOH tagoh@redhat.com --- Ah, you're right. I'm not sure even if ftview is capable to render the ligatures, but how about this then:
hb-view --text "t ti fi tt" /usr/share/fonts/lato/Lato-Regular.ttf
We can confirm it works on harfbuzz layer.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #19 from James james@ettle.org.uk --- (In reply to Akira TAGOH from comment #18)
Ah, you're right. I'm not sure even if ftview is capable to render the ligatures, but how about this then:
hb-view --text "t ti fi tt" /usr/share/fonts/lato/Lato-Regular.ttf
We can confirm it works on harfbuzz layer.
The renderings from hb-view looks OK to me -- it's difficult to tell because it seems to be using different font size units to pango-view, and I'm not sure it's applying the same anti-aliasing and hinting settings.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #20 from Peng Wu pwu@redhat.com --- Right, I think we need to use similar settings in hb-view for comparison.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #21 from Peng Wu pwu@redhat.com --- It seems this bug is triggered by different hinting style.
I tried with different hinting style like none/medium/full, the ligatures aligned correctly.
But for hinting style with auto/slight, this bug happens.
Here are the testing command: $ pango-view --text="t ti fi tt" --hinting=full --font="Lato 8"
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #22 from Alexei Podtelezhnikov apodtele@gmail.com --- Created attachment 1728793 --> https://bugzilla.redhat.com/attachment.cgi?id=1728793&action=edit ftview screenshot
(In reply to Peng Wu from comment #21)
But for hinting style with auto/slight, this bug happens.
I can confirm that FreeType autohinter ignores non-Unicode ligatures, see attached. Please change the component back to FreeType.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ajax@redhat.com, | |kevin@tigcc.ticalc.org, | |mkasik@redhat.com Component|pango |freetype
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
James james@ettle.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ti, tt ligatures (of at |Auto-hinter ignores |least Lato font) loaded |non-unicode ligatures (e.g. |without hinting |Lato ti, tt)
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #23 from Alexei Podtelezhnikov apodtele@gmail.com --- Fedora comes with FreeType without HarfBuzz [https://savannah.nongnu.org/bugs/?59452]. So there is a fix but it is a circular dependency.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #24 from James james@ettle.org.uk --- (In reply to Alexei Podtelezhnikov from comment #23)
Fedora comes with FreeType without HarfBuzz [https://savannah.nongnu.org/bugs/?59452]. So there is a fix but it is a circular dependency.
Understood -- I just rebuild the freetype RPM locally with harfbuzz enabled in the spec and the ligatures look correct.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #25 from James james@ettle.org.uk --- Couldn't this be worked around by creating a package like freetype-nonharfbuzz built without HarfBuzz, use that purely as a builddep for the harfbuzz package in the Fedora buildsystem, and then build a freetype package depending on harfbuzz?
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #26 from Akira TAGOH tagoh@redhat.com --- We may need some tweaks in the spec file to enable bootstrap. https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|unspecified |medium
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #27 from Akira TAGOH tagoh@redhat.com --- Created a testing package with harfbuzz enabled.
https://copr.fedorainfracloud.org/coprs/tagoh/freetype-harfbuzz/
Indeed, the result of ftview looks good to me.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #28 from James james@ettle.org.uk --- I confirm your SRPM builds for me on Fedora 33 and works as expected.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|pikachu.2014@gmail.com |mkasik@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |1906714
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1906714 [Bug 1906714] Enable OpenType related features with HarfBuzz
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|32 |rawhide
--- Comment #29 from Akira TAGOH tagoh@redhat.com --- Moving this to rawhide. we are planning to fix this there.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937 Bug 1853937 depends on bug 1906714, which changed state.
Bug 1906714 Summary: Enable OpenType related features with HarfBuzz https://bugzilla.redhat.com/show_bug.cgi?id=1906714
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |RAWHIDE
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Marek Kašík mkasik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |freetype-2.10.4-3.fc34
--- Comment #30 from Marek Kašík mkasik@redhat.com --- I've verified that the new freetype with harfbuzz support enabled fixes the issue. I've used the pango-view command from the comment #14 for that. I'm closing this. Thank you all for your help.
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
--- Comment #32 from James james@ettle.org.uk --- Seems fixed on my F34 box running freetype-2.10.4-3.fc34.x86_64, harfbuzz-2.7.4-3.fc34.x86_64 -- OK to close as fixed?
https://bugzilla.redhat.com/show_bug.cgi?id=1853937
Mohamed El Morabity pikachu.2014@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |CURRENTRELEASE Status|NEW |CLOSED Last Closed| |2021-10-01 17:39:11
fonts-bugs@lists.fedoraproject.org