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 762873 - OS X fails to support comma-separated font list
OS X fails to support comma-separated font list
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.38.x
Other Mac OS
: Normal normal
: ---
Assigned To: Kristian Rietveld
pango-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-29 14:36 UTC by Peter Bowen
Modified: 2018-05-22 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds support for commas in the font description's family name on OS X (4.55 KB, patch)
2016-07-29 21:28 UTC, Caleb Hearon
none Details | Review
Add comma support for font selections on macOS (3.87 KB, patch)
2017-10-13 13:56 UTC, Caleb Hearon
none Details | Review

Description Peter Bowen 2016-02-29 14:36:13 UTC
On OS X, if one passes a string containing a comma-separated font list to pango_font_description_set_family, the result is no font matches.  Passing the members one at a time shows that each individual name is recognized and used properly.

For example:

pango-view --no-display --output out1.png --text '0123456789 - @ The lazy fox something something' --font "Anonymous Pro Minus, monospace" renders an image using a proportional sans-serif font (not monospace).
pango-view --no-display --output out2.png --text '0123456789 - @ The lazy fox something something' --font "Anonymous Pro Minus" renders using Anonymous.
pango-view --no-display --output out3.png --text '0123456789 - @ The lazy fox something something' --font "monospace" renders using a monospace font that is not Anonymous.
pango-view --no-display --output out4.png --text '0123456789 - @ The lazy fox something something' --font "QuuxXyzzy" renders identically to the first one. QuuxXyzzy is a made up string that does not match any font on my system.
Comment 1 Caleb Hearon 2016-07-29 21:28:59 UTC
Created attachment 332369 [details] [review]
Adds support for commas in the font description's family name on OS X

I noticed this too and I just finished a draft of a patch to pango_core_text_fontset_new to fix it.

The behavior when a font family has no comma should be completely identical to what it was before the patch. When there is a comma, if certain families don't have matches it'll pick the first match

I deleted best_description because I could't find any evidence of it being useful, and the corresponding argument in find_best_match could probably be deleted too (only the face seems to be relevant)
Comment 2 Caleb Hearon 2017-08-30 12:51:24 UTC
Would anyone be able to find time to review my patch to this? It's causing a bug in our font API in node-canvas. I had one other macOS patch get accepted, if that helps!
Comment 3 Behdad Esfahbod 2017-08-31 23:08:37 UTC
lgtm
Comment 4 Behdad Esfahbod 2017-09-18 16:41:42 UTC
Matthias might be able to test and commit this...
Comment 5 Caleb Hearon 2017-10-13 13:56:26 UTC
Created attachment 361522 [details] [review]
Add comma support for font selections on macOS

Thanks, Behdad. There were some recent changes to pango_core_text_fontset_new so I'm attaching the updated patch that I've been using for a couple of days.
Comment 6 GNOME Infrastructure Team 2018-05-22 13:16:57 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/252.