summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-07-09 11:35:22 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-07-09 12:08:18 -0400
commit79e0a95b7d63edf2fed2a1888c6ca591d19c64f9 (patch)
tree905c1d8085ce1266fd179e0bd1cc908095c23a77
parent06b5b427552599ef45484b6ecac9820333b4bf03 (diff)
downloadpango-79e0a95b7d63edf2fed2a1888c6ca591d19c64f9.tar.gz
generic: Try without language too
It turns out that fonts are unreliable in claiming support for und-zsye or und-zsym, so try without language before giving up.
-rw-r--r--pango2/pango-generic-family.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pango2/pango-generic-family.c b/pango2/pango-generic-family.c
index bfa5ceb4..96580085 100644
--- a/pango2/pango-generic-family.c
+++ b/pango2/pango-generic-family.c
@@ -234,6 +234,16 @@ pango2_generic_family_find_face (Pango2GenericFamily *self,
break;
}
+ /* Try without language */
+ for (int i = 0; i < self->families->len; i++)
+ {
+ Pango2HbFamily *family = g_ptr_array_index (self->families, i);
+
+ face = pango2_hb_family_find_face (family, description, NULL, wc);
+ if (face)
+ break;
+ }
+
/* last resort */
if (!face && self->families->len > 0)
{