[pango/pango2-windows: 1/7] pangodwrite-fontmap.cpp: Make hb_face from DirectWrite immutable




commit 8a20565428b36f1652c0d0fce5e1fd944273192f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jun 15 12:10:13 2022 +0800

    pangodwrite-fontmap.cpp: Make hb_face from DirectWrite immutable
    
    The hb_face_t object that we get from HarfBuzz with the
    DirectWriteFontFace object that we have may not be immutable, so make it
    immutable if that is the case.

 pango/pangodwrite-fontmap.cpp | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/pango/pangodwrite-fontmap.cpp b/pango/pangodwrite-fontmap.cpp
index 9a274904..be8d9104 100644
--- a/pango/pangodwrite-fontmap.cpp
+++ b/pango/pangodwrite-fontmap.cpp
@@ -214,6 +214,8 @@ util_create_pango_hb_face (IDWriteFontFamily *family,
       hb_face_t *hb_face = hb_directwrite_face_create (face);
       char *name = g_strconcat (family_name, " ", variant_name, NULL);
 
+      hb_face_make_immutable (hb_face);
+
       pango_face = pango_hb_face_new_from_hb_face (hb_face, -1, name, description);
 
       g_free (name);


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