GNOME Bugzilla – Bug 734882
Improve fontchooserwidget API and fontchooserbutton display text
Last modified: 2014-12-28 03:19:28 UTC
+++ This bug was initially created as a clone of Bug #733832 +++ Forking from bug 733832 to track the parts not fixed in that bug. Copying: ============================================================================ Problem is, currently fontchooser widgets keep a PangoFontDescription internally and use the pango_font_description_to_string() return value for user display of the selected font. However, this is less than ideal. As an example, consider the Noto Sans CJK DemiLight font. PangoFontDescription parses that, notices that DemiLight is another name for SemiLight, detects the font weight correctly, and then converts to text as Noto Sans CJK SemiLight, which is not the name of any font in existence. The PangoFontFace has that correct name. And the fontchooser used to use that. I'll attach a patch for fontchooserwidget that resurrects that. However, the bug will remain in fontbutton, and we can't fix it there because we don't have the PangoFontFace anymore. So I think the correct way to fix this is to add new API to fontchooserwidget and fontchooserbutton to get/set strings, instead of PangoFontDescription. And make fontchooserbutton use that new API of fontchooserwidget, to correctly retain the preferred name. ============================================================================ Matthias committed the patch there to fix the fontchooserwidget. But now when you choose "Noto Sans CJK DemiLight" and close the dialog, the fontchooserbutton shows "Noto Sans CJK SemiLight". The last paragraph above is what this bug tracks.
I actually pushed a followup commit that was supposed to fix the font button. Let me know if that doesn't work