Bug 1398676 - Pango sometimes shows a replacement character for space (U+0020) when a font lacks a space
Summary: Pango sometimes shows a replacement character for space (U+0020) when a font ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: pango
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-25 14:38 UTC by Mike FABIAN
Modified: 2017-12-12 10:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:18:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
pango-bug.png (249.47 KB, image/png)
2016-11-25 14:38 UTC, Mike FABIAN
no flags Details
OldHungarian.ttf (22.25 KB, application/octet-stream)
2016-11-25 14:39 UTC, Mike FABIAN
no flags Details
rovas.txt (26 bytes, text/plain)
2016-11-25 14:40 UTC, Mike FABIAN
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 775202 0 None None None 2016-11-28 05:58:40 UTC

Description Mike FABIAN 2016-11-25 14:38:21 UTC
Created attachment 1224372 [details]
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.

Comment 1 Mike FABIAN 2016-11-25 14:39:40 UTC
Created attachment 1224373 [details]
OldHungarian.ttf

This font lacks a space.

Comment 2 Mike FABIAN 2016-11-25 14:40:31 UTC
Created attachment 1224374 [details]
rovas.txt

Test file. Display it with 

pango-view --font="Old Hungarian" ~/rovas.txt

Comment 3 Mike FABIAN 2016-11-25 15:07:18 UTC
See also: 

https://github.com/OldHungarian/old-hungarian-font/issues/1

Comment 4 Akira TAGOH 2016-11-25 15:50:23 UTC
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.

Comment 5 Mike FABIAN 2016-11-28 06:08:03 UTC
(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> 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?

Comment 7 Andreas Schneider 2016-11-28 09:00:36 UTC
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 ...

Comment 8 Mike FABIAN 2016-11-28 11:59:00 UTC
(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?

Comment 9 Akira TAGOH 2016-11-29 03:19:43 UTC
Dunno. the original issue for that seems fixed with it at least though.

Comment 10 Fedora End Of Life 2017-11-16 18:51:57 UTC
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.

Comment 11 Fedora End Of Life 2017-12-12 10:18:29 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.