After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 515545 - Pango.Aliases: cannot have aliased names with spaces, even with quotes
Pango.Aliases: cannot have aliased names with spaces, even with quotes
Status: RESOLVED DUPLICATE of bug 492504
Product: pango
Classification: Platform
Component: win32
1.18.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-02-10 10:27 UTC by Idan Gazit
Modified: 2008-02-10 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Idan Gazit 2008-02-10 10:27:41 UTC
Please describe the problem:
In both the user-specific and the global pango aliases file in win32 (perhaps on other platforms too -- do not know), you cannot specify an aliased name that has spaces in it.

For example:
sans = "dejavu sans,arial,lucida sans unicode"
segoe ui = "dejavu sans,arial,lucida sans unicode"
"segoe ui" = "dejavu sans,arial,lucida sans unicode"

The first aliasing will work, but the second and third lines will not because of the space in the aliased font name "segoe ui".

This becomes a problem when using the win32 theme engine for GTK apps on windows, particularly on vista (where the default system font is "segoe ui"). The resulting problem caused by this is "gibberish" display of missing glyphs from the system font, which is not solvable via the pango.aliases file because the aliased font has a space in the name.

In particular, this is the source of several bugs in the Pidgin IM client (#604, #2966).

Tor Lillqvist has looked into this in the past and confirmed this bug: http://permalink.gmane.org/gmane.comp.video.gimp.windows.user/13657

Workarounds exist, but they are impractical and user-unfriendly. Users can set the systemwide font to another font without a space in the name (forces the user to change the entire look of their desktop in order to get legible glyphs in some applications), and then using the pango.aliases file. Another workaround is to change the GTK theme to something other than MS-Windows (leaves GTK applications sticking out like a non-native sore thumb).

Please, please add the ability to have quoted strings with spaces as the aliased name, so we can use the aliasing method as intended and designed.

Steps to reproduce:
1. Setup an alias in the pango.aliases file, either user specific (in %userprofile%), global (program files\common files\gtk\2.0\etc\pango\), or both, which looks like:

segoe ui = "somefont, someotherfont, etc..."

2. Restart GTK applications
3. Have these applications attempt to render some text with glyphs missing from segoe ui font


Actual results:
Receive placeholder glyphs (box w/ unicode address glyph) instead of pango falling back on the fonts in the mapping

Expected results:
Pango falls back on the fonts in the alias, in order, and renders the glyph using the first font that actually contains it (if found).

Does this happen every time?
Yes.

Other information:
Are there other restrictions in what can constitute an aliased name? These should be solved, or at least documented.
Comment 1 Idan Gazit 2008-02-10 10:29:12 UTC
May be related to #162861 but not sure, that discussion is too technical for me to parse whether it is talking about the same case.
Comment 2 Behdad Esfahbod 2008-02-10 21:58:12 UTC
Already fixed in 1.18.4:

2007-11-02  Tor Lillqvist  <tml@novell.com>

        * pango/pango-utils.c (read_alias_file): Accept also a quoted
        string for the left-hand side of an aliases file line. This is to
        enable aliasing fonts with spaces in their name, like "Segoe UI"
        which is the default system font on Vista. (#492504)



*** This bug has been marked as a duplicate of 492504 ***