[pango/pango2: 7/7] generic: Try without language too




commit 79e0a95b7d63edf2fed2a1888c6ca591d19c64f9
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 9 11:35:22 2022 -0400

    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.

 pango2/pango-generic-family.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/pango2/pango-generic-family.c b/pango2/pango-generic-family.c
index bfa5ceb40..965800850 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)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]