[pango/pango1-dwrite] PangoWin32: Add private API to clean up IDWriteFontFace
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango1-dwrite] PangoWin32: Add private API to clean up IDWriteFontFace
- Date: Tue, 16 Aug 2022 05:07:12 +0000 (UTC)
commit e82edc5c6f4a87e5a92749333edaaf5e24d468a8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Aug 16 12:54:26 2022 +0800
PangoWin32: Add private API to clean up IDWriteFontFace
...which is needed for PangoCairo for Windows, when DirectWrite is used to
create the cairo_font_face_t, so that that object does get cleaned up when the
cairo_font_face_t is destroyed.
pango/pangowin32-dwrite-fontmap.cpp | 9 +++++++++
pango/pangowin32-private.h | 3 +++
2 files changed, 12 insertions(+)
---
diff --git a/pango/pangowin32-dwrite-fontmap.cpp b/pango/pangowin32-dwrite-fontmap.cpp
index 62f2d6362..62d905af8 100644
--- a/pango/pangowin32-dwrite-fontmap.cpp
+++ b/pango/pangowin32-dwrite-fontmap.cpp
@@ -568,3 +568,12 @@ pango_win32_dwrite_font_release (gpointer dwrite_font)
if (font != NULL)
font->Release ();
}
+
+void
+pango_win32_dwrite_font_face_release (gpointer dwrite_font_face)
+{
+ IDWriteFontFace *face = static_cast<IDWriteFontFace *>(dwrite_font_face);
+
+ if (face != NULL)
+ face->Release ();
+}
diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h
index 2f9bbf601..1502ecd92 100644
--- a/pango/pangowin32-private.h
+++ b/pango/pangowin32-private.h
@@ -313,6 +313,9 @@ gboolean pango_win32_dwrite_font_is_monospace (gpointer
void pango_win32_dwrite_font_release (gpointer dwrite_font);
+_PANGO_EXTERN
+void pango_win32_dwrite_font_face_release (gpointer dwrite_font_face);
+
gpointer pango_win32_logfontw_get_dwrite_font (LOGFONTW *logfontw);
PangoFontDescription *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]