diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2019-01-25 19:46:14 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2019-01-25 19:46:14 +0000 |
commit | 982445fe1c234b1ef5173556a73f659946c1a288 (patch) | |
tree | 30f5b5739d1887c32a10fdc4431834e5a3ed4896 | |
parent | 267d991d9b6f040580a6421a0f52c292ed9304dc (diff) | |
parent | 30ab4379a60828be1ff570a518be63942389b849 (diff) | |
download | pango-982445fe1c234b1ef5173556a73f659946c1a288.tar.gz |
Merge branch 'master' into 'master'
macOS: Use system `Apple Color Emoji` font for emoji characters.
Closes #348
See merge request GNOME/pango!40
-rw-r--r-- | pango/pangocoretext-fontmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c index 6fc8a279..b4654268 100644 --- a/pango/pangocoretext-fontmap.c +++ b/pango/pangocoretext-fontmap.c @@ -1323,7 +1323,8 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, if (G_UNLIKELY (!fontset)) { - /* If no font(set) could be loaded, we fallback to "Sans", + /* If no font(set) could be loaded, we fallback to "Apple Color + * Emoji" for emoji font, fallback to "Sans" for other fonts, * which should always work on Mac. We try to adhere to the * requested style at first. */ @@ -1333,7 +1334,10 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, pango_font_description_free (key.desc); tmp_desc = pango_font_description_copy_static (desc); - pango_font_description_set_family_static (tmp_desc, "Sans"); + if (strcmp (pango_font_description_get_family (tmp_desc), "emoji") == 0) + pango_font_description_set_family_static (tmp_desc, "Apple Color Emoji"); + else + pango_font_description_set_family_static (tmp_desc, "Sans"); pango_core_text_fontset_key_init (&key, ctfontmap, context, tmp_desc, language); |