[pango/pango2: 1/5] Allow variant information in face descriptions




commit 09f3d988e7cb9ec952e9223f18b7e7f8a17a53e9
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jun 16 06:56:15 2022 -0400

    Allow variant information in face descriptions
    
    This is needed to fix small-caps roundtrips on MacOS.

 pango/pango-fontmap.c | 3 +--
 pango/pango-hbface.c  | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index 99fbae64..fbcd4c86 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -874,8 +874,7 @@ pango_font_map_add_face (PangoFontMap  *self,
 
   description = face->description;
 
-  if (pango_font_description_get_set_fields (description) &
-      (PANGO_FONT_MASK_VARIANT | PANGO_FONT_MASK_GRAVITY))
+  if (pango_font_description_get_set_fields (description) & PANGO_FONT_MASK_GRAVITY)
     g_warning ("Font description for PangoFontFace includes things that it shouldn't");
 
   if (!self->in_populate)
diff --git a/pango/pango-hbface.c b/pango/pango-hbface.c
index 90459aa3..adee83f4 100644
--- a/pango/pango-hbface.c
+++ b/pango/pango-hbface.c
@@ -177,7 +177,6 @@ set_name_and_description (PangoHbFace                *self,
        */
       face->description = pango_font_description_from_string (fullname);
       pango_font_description_unset_fields (face->description,
-                                           PANGO_FONT_MASK_VARIANT |
                                            PANGO_FONT_MASK_VARIATIONS |
                                            PANGO_FONT_MASK_GRAVITY);
 
@@ -704,9 +703,7 @@ pango_hb_face_new_from_hb_face (hb_face_t                 *face,
   g_return_val_if_fail (instance_id >= -2, NULL);
   g_return_val_if_fail (description == NULL ||
                         (pango_font_description_get_set_fields (description) &
-                         (PANGO_FONT_MASK_VARIANT|
-                          PANGO_FONT_MASK_SIZE|
-                          PANGO_FONT_MASK_GRAVITY)) == 0, NULL);
+                         (PANGO_FONT_MASK_SIZE|PANGO_FONT_MASK_GRAVITY)) == 0, NULL);
 
   self = g_object_new (PANGO_TYPE_HB_FACE, NULL);
 


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