https://bugzilla.redhat.com/show_bug.cgi?id=1398676
Bug ID: 1398676 Summary: Pango sometimes shows a replacement character for space (U+0020) when a font lacks a space Product: Fedora Version: 25 Component: pango Assignee: tagoh@redhat.com Reporter: mfabian@redhat.com QA Contact: extras-qa@fedoraproject.org CC: fonts-bugs@lists.fedoraproject.org, i18n-bugs@lists.fedoraproject.org, tagoh@redhat.com
Created attachment 1224372 --> https://bugzilla.redhat.com/attachment.cgi?id=1224372&action=edit pango-bug.png
Tested on the released version of Fedora 25. pango-1.40.3-1.fc25.x86_64
When using a font which does not have a space, Pango may show a replacement character for space( U+0020).
I’ll attach the file rovas.txt which has a first line containing only Old Hungarian script and a space.
I’ll also attach an old Hungarian font taken from https://github.com/OldHungarian/old-hungarian-font/releases which lacks a space.
Display the test file like this:
pango-view --font="Old Hungarian" ~/rovas.txt
And you get something as in the also attached screenshot which shows that Pango renders the space as an replacement character.
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mfabian@redhat.com
--- Comment #1 from Mike FABIAN mfabian@redhat.com --- Created attachment 1224373 --> https://bugzilla.redhat.com/attachment.cgi?id=1224373&action=edit OldHungarian.ttf
This font lacks a space.
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #2 from Mike FABIAN mfabian@redhat.com --- Created attachment 1224374 --> https://bugzilla.redhat.com/attachment.cgi?id=1224374&action=edit rovas.txt
Test file. Display it with
pango-view --font="Old Hungarian" ~/rovas.txt
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #3 from Mike FABIAN mfabian@redhat.com --- See also:
https://github.com/OldHungarian/old-hungarian-font/issues/1
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #4 from Akira TAGOH tagoh@redhat.com --- Mike, can you file a bug to upstream bugzilla as well? Though that looks to me like a bug in font as well as we saw the similar issue in the Indic fonts and fixed it there. I'm not sure if the en.orth file in fontconfig should contains U+0020 to avoid the sort of this situation. dunno if that really helps. not yet tested.
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- External Bug ID| |GNOME Desktop 775202
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #5 from Mike FABIAN mfabian@redhat.com --- (In reply to Akira TAGOH from comment #4)
Mike, can you file a bug to upstream bugzilla as well?
Done: https://bugzilla.gnome.org/show_bug.cgi?id=775202
Though that looks to me like a bug in font as well as we saw the similar issue in the Indic fonts and fixed it there.
Was a space missing in the Indic fonts? Is there a requirement in some standard that a font must have a space?
The upstream author of OldHungarian.ttf is reluctant to add a space, see:
https://github.com/OldHungarian/old-hungarian-font/issues/1
stupy> Meanwhile I saw that adding the space character will most stupy> likely break web usage for the font, as it will override the stupy> main space character for the site for normal text as well. I stupy> might need to create two separate fonts, one with extra glyphs, stupy> and one without them
He created two different fonts now, one with a space and one without. This is quite ugly and confusing I think. Therefore, if fonts are not required to have a space by some standard, this probably should be fixed in Pango.
A similar problem recently occured for Andreas Schneider asn@redhat.com without using OldHungarian.ttf but some other fonts on a default installation of Fedora. So this may happen in some circumstances even on a default installation of Fedora.
I'm not sure if the en.orth file in fontconfig should contains U+0020 to avoid the sort of this situation. dunno if that really helps. not yet tested.
Is en.orth relevant if a line rendered by pango-view contains only Old Hungarian for example?
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #6 from Akira TAGOH tagoh@redhat.com --- This might be related: https://git.gnome.org/browse/pango/commit/?id=d489ad061d70526fc5f5cdae2273e9...
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #7 from Andreas Schneider asn@redhat.com --- The scenario I had was that an application used a BLACK STAR (U+2605). The font I use is Noto Sans which doesn't include that char. So it is looking for another font providing it. I have texlive installed which installs several fonts for texlive. So it picked up the first font it found which included the BLACK STAR. This font was a chinese font starting with the letter A. And that font did not have a space.
Creating a ~/.config/fontconfig/fonts.conf with fallbacks to a better font, worked around that problem.
Maybe it would make sense to define symbolic fallback fonts during the installation based on the keyboard language you select ...
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #8 from Mike FABIAN mfabian@redhat.com --- (In reply to Akira TAGOH from comment #6)
This might be related: https://git.gnome.org/browse/pango/commit/ ?id=d489ad061d70526fc5f5cdae2273e9deabea6a17
Yes! That seems to cause the problem.
I think is not reasonable to assume that every font has a the ASCII space. Can’t the problem for Mongolian be fixed without breaking it for fonts which don’t have the ASCII space?
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #9 from Akira TAGOH tagoh@redhat.com --- Dunno. the original issue for that seems fixed with it at least though.
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
--- Comment #10 from Fedora End Of Life jkurik@fedoraproject.org --- This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1398676
Fedora End Of Life jkurik@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |EOL Last Closed| |2017-12-12 05:18:29
--- Comment #11 from Fedora End Of Life jkurik@fedoraproject.org --- Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug.
Thank you for reporting this bug and we are sorry it could not be fixed.
fonts-bugs@lists.fedoraproject.org