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 123498 - GtkFontSelection should localize style list
GtkFontSelection should localize style list
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
2.2.x
Other All
: High minor
: Small feature
Assigned To: gtk-bugs
gtk-bugs
: 319484 (view as bug list)
Depends on: 95731
Blocks:
 
 
Reported: 2003-09-29 17:31 UTC by Christian Neumair
Modified: 2013-10-06 05:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. Definitly works with 2.2, applies cleanly to HEAD as of today. (955 bytes, patch)
2003-09-29 17:32 UTC, Christian Neumair
needs-work Details | Review
Updated patch for GTK+ 3 (including new widgets) (2.96 KB, patch)
2011-09-16 10:01 UTC, Vincent Untz
needs-work Details | Review

Description Christian Neumair 2003-09-29 17:31:49 UTC
The font style list isn't i18n'ized. The attached patch adds some gettext
calls and adds four strings.

regs,
 Chris
Comment 1 Christian Neumair 2003-09-29 17:32:44 UTC
Created attachment 20361 [details] [review]
Proposed patch. Definitly works with 2.2, applies cleanly to HEAD as of today.
Comment 2 Owen Taylor 2003-09-29 18:32:48 UTC
Fonts can have many different styles; the 
Regular/Bold/Bold Italic/Italic combination is just one
possibility. You need to handle all the different string
forms of the style enumerations that are found in pango/fonts.c.
Comment 3 Christian Neumair 2003-10-31 19:00:51 UTC
Should I really add every single style/variant/weight specification?
If I only stick to this file, it won't work since we've got "Regular",
too - which isn't mentioned in there. Combinations like "Bold Italic"
aren't inside this file as well.
From what I can see, we have to look somewhere else - at least for the
fc backend, we have only four possible combinations that are all
covered by the patch. Please take a look at
pango/pangofc-fontmap.c:pango_fc_family_list_faces.
IMHO we should commit the patch and research the available
combinations for other backends later.

regs,
 Chris
Comment 4 Owen Taylor 2003-10-31 19:28:16 UTC
No, this patch won't be applied; perhaps the localization
needs to occur at the Pango level; I'd have to look at how
it works again to say for sure.
Comment 5 Owen Taylor 2003-10-31 19:29:10 UTC
(and, yes, I get gtk-bugs@gtk.org email)
Comment 6 bill.haneman 2003-12-08 15:05:53 UTC
if we localize font style info, we need to be careful to retain a
non-localized query capability since clients may need to test the
'canonical' i.e. non-localized strings.  for instance, assistive
technologies get this info and then re-present it to the user (using
client-side localization).
Comment 7 Christian Neumair 2003-12-08 18:39:10 UTC
Bill: Shouldn't those use pango_font_face_get_face_name or do they
directly "query" the UI (the font list). IMHO this would be a bit hacky.
Is there any widespread code currently relying on that?
What could be done about this?
gtk_font_selection_show_available_styles is static, so at least it is
no lib export issue.

regs,
 Chris
Comment 8 Christian Neumair 2004-04-30 11:59:36 UTC
Louie: Why does the patch need work? I didn't get any serious feedback on a
better implementation.

regs,
 Chris
Comment 9 Behdad Esfahbod 2005-10-25 18:01:17 UTC
*** Bug 319484 has been marked as a duplicate of this bug. ***
Comment 10 Christian Neumair 2005-10-25 19:01:42 UTC
Owen: Maybe you could take another look at the issue.
Bill: How is are the ally strings extraced from a tree view?
Comment 11 James Su 2005-10-26 01:43:16 UTC
You may refer to bug #319484. I posted an better patch there.
http://bugzilla.gnome.org/attachment.cgi?id=53766&action=view

This issue is different from bug #95731. That bug tells that it should be able
to get localized family and style name STORED in the FONT via pango.

However there are large amount of fonts which don't provide localized family and
style name at all. So for non-English users, it's hard to understand the meaning
of "Regular, Italic, Bold" etc. Fortunately, most fonts use the same set of
style names, so that we could localize them in po files.
Comment 12 Matthias Clasen 2005-10-26 01:56:05 UTC
But this localization should still happen in pango, don't you think ?
Comment 13 James Su 2005-10-26 02:22:29 UTC
Yes, you could fix it in pango, but however you need change pango's API to
support it, just like bug #95731. It's more diffcult.
Comment 14 Murray Cumming 2007-05-04 20:07:12 UTC
So, shouldn't this be reassigned to Pango?
Comment 15 Christian Dywan 2008-11-11 12:30:30 UTC
Any movement here? It's a pretty essential flaw that font styles are never localized and for what I want, Christian's patch in comment #1 would already help with the lion share of the common fonts.
Comment 16 Vincent Untz 2011-09-16 10:01:02 UTC
Created attachment 196703 [details] [review]
Updated patch for GTK+ 3 (including new widgets)

While this is not the approach we want (should get fixed in pango), we use this patch in openSUSE as it makes a big difference for users. This is the updated version for GTK+ 3.
Comment 17 antistress 2013-06-28 02:04:15 UTC
Using LibreOffice or the recent gnome-font-viewer, i can see these styles Regular/Bold/Italic/Semibold/Caps/Condensed/Oblique/Extralight/Book/Small Caps/Slanted/Initials/Normal/Medium/BoldOblique [1]/Demi/Light/LightOblique [2]/Bold.1.1 [3]/BoldItalic [4]/regular (+ combination of each)

[1] For Waree, Umpush, Tlwg Typo, Tlwg Typist, TlwgTypewriter, TlwgMono, Sawasdee, Purisa, Norasi, Loma, Kinnari, Garuda fonts. Maybe is it a bug on my Debian system and that it should be "Bold Oblique"
[2] For Umpush fonts. Maybe is it a bug on my Debian system and that it should be "LightOblique"
[3] For padmaa-Bold.1.1 fonts. Maybe is it a bug on my Debian system and that it should be "Bold"
[4] For Kinnari fonts. Maybe is it a bug on my Debian system and that it should be "BoldI talic"

Thanks
Comment 18 antistress 2013-07-02 23:47:24 UTC
I've just learned (after having filled a bug report against Debian in which LinuxLibertine have typos : "Samll Caps" instead of "Small Caps") that LinuxLibertine guys will no longer produce font substyles. See http://sourceforge.net/p/linuxlibertine/bugs/168/
Comment 19 Matthias Clasen 2013-10-06 05:31:59 UTC
GtkFontSelection has been deprecated, and the new font chooser doesn't have a style list.