summaryrefslogtreecommitdiff
path: root/pango/pangodwrite-fontmap.cpp
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2022-06-15 12:10:13 +0800
committerMatthias Clasen <mclasen@redhat.com>2022-06-22 13:57:26 -0400
commit94bec904d618baf9d881cb2d59ad4c3288feb074 (patch)
treeb5f770e491d07a5020428340b6d69d55f63f7aec /pango/pangodwrite-fontmap.cpp
parentec5c87eca6054f0c60f64798886160d44f480921 (diff)
downloadpango-94bec904d618baf9d881cb2d59ad4c3288feb074.tar.gz
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.
Diffstat (limited to 'pango/pangodwrite-fontmap.cpp')
-rw-r--r--pango/pangodwrite-fontmap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pangodwrite-fontmap.cpp b/pango/pangodwrite-fontmap.cpp
index 1ef30324..5c7ad0eb 100644
--- a/pango/pangodwrite-fontmap.cpp
+++ b/pango/pangodwrite-fontmap.cpp
@@ -212,6 +212,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);