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 95731 - Add API to get localized family/style names
Add API to get localized family/style names
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: Small API
Assigned To: pango-maint
pango-maint
: 310316 539681 (view as bug list)
Depends on:
Blocks: 123498 319484
 
 
Reported: 2002-10-14 15:52 UTC by Owen Taylor
Modified: 2018-05-22 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
My proposal. (6.03 KB, patch)
2005-10-15 07:11 UTC, James Su
rejected Details | Review

Description Owen Taylor 2002-10-14 15:52:14 UTC
Need to add something like:

 char *pango_font_font_family_get_display_name (PangoFontFamily *family,
                                                PangoLanguage    lang);
 char *pango_font_font_face_get_display_name   (PangoFontFace   *face,
                                                PangoLanguage    lang);

See discussion in bug 68113.
Comment 1 Owen Taylor 2004-12-13 21:45:46 UTC
fontconfig-2.3 hopefully will have the necessary underlying bits.
Comment 2 Owen Taylor 2005-07-14 14:30:54 UTC
*** Bug 310316 has been marked as a duplicate of this bug. ***
Comment 3 James Su 2005-10-15 06:46:05 UTC
There are several drawbacks of adding such new APIs:

1. Adding new APIs will break binary compatibility.
2. We must patch all applications and libraries which use pango, in order to let
them use the new APIs.
3. These two APIs are not enough, we also need something like
pango_font_face_describe_by_language (),
pango_font_description_get_display_family (). It'll make things much more complex.
Comment 4 James Su 2005-10-15 07:11:14 UTC
Created attachment 53504 [details] [review]
My proposal.
Comment 5 Owen Taylor 2005-10-16 02:59:39 UTC
1. We don't make strong guarantees about the implementation of font
   systems, the implementation is protected with PANGO_ENABLE_BACKEND.

2. Yep. If you add new capabiitites apps generally have to be modified
   to use those capabilities. You can't just suddenly start using existing
   APIs to mean something different. (A global setting  that changes
   API behavior is a particularly bad thing to do. The application can pull
   the rug out from under he feet of the library. Or vice versa.)

3. I don't see any reason for pango_font_face_describe_by_language()
   or "pango_font_description_get_display_family()" ... a 
   A font description is *programmatic* somethingyou store in a config
   file. There is no reason to localize it.
Comment 6 James Su 2005-10-19 04:15:28 UTC
1. So I think similiar behaviour should be implemented in other backends as well.

2. In fontconfig/freetype, all family names are equal. A font can be loaded by
its English name as well as its Chinese name. So IMO. The concept of "display
name" is not suitable in such situation. So why pango_font_map_list_families can
only return English names of the fonts?

3. Because, as you konw, pango_font_face_describe () is used in GtkFontSelection
to get the font's name. The name is not only used for configuration file, but
also for displaying (for example, GtkFontButton). So if
pango_font_family_get_display_name() is introduced to get the "display name" of
a font family, pango_font_face_describe () is also necessary to get the "display
name" of a font face.

However, I already solved this issue in fontconfig. So,at least in fontconfig
based system, we don't need to change pango. (sa.
https://bugzilla.novell.com/show_bug.cgi?id=128930).
Comment 7 yydzero 2006-04-13 06:49:55 UTC
track this bug status
Comment 8 Behdad Esfahbod 2009-01-04 02:41:41 UTC
*** Bug 539681 has been marked as a duplicate of this bug. ***
Comment 9 Behdad Esfahbod 2012-06-05 14:57:07 UTC
FWIW, fontconfig now supports FC_NAMELANG that allows defaulting to one language over the other for these strings.
Comment 10 GNOME Infrastructure Team 2018-05-22 12:01:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/3.