[pango/pango1-dwrite: 9/9] PangoCairo: Create CairoFont using DirectWrite
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango1-dwrite: 9/9] PangoCairo: Create CairoFont using DirectWrite
- Date: Mon, 15 Aug 2022 10:11:33 +0000 (UTC)
commit 719917c03504afecf8508a27b717a79027894aac
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Aug 15 17:35:09 2022 +0800
PangoCairo: Create CairoFont using DirectWrite
...if Cairo is built with DirectWrite support. With this, we can
support colored Emoji, a long-standing issue, on Windows without needing
to use FontConfig.
This will really fix issue !302 completely, regarding the Emoji not
shown in color!
pango/pangocairo-win32font.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c
index 5b860bab8..9d721fbdd 100644
--- a/pango/pangocairo-win32font.c
+++ b/pango/pangocairo-win32font.c
@@ -75,7 +75,15 @@ pango_cairo_win32_font_create_font_face (PangoCairoFont *font)
{
PangoCairoWin32Font *cwfont = PANGO_CAIRO_WIN32_FONT (font);
PangoWin32Font *win32font = &cwfont->font;
+ void *dwrite_font_face = NULL;
+ gpointer dwrite_font = NULL;
+#ifdef HAVE_CAIRO_WIN32_DIRECTWRITE
+ dwrite_font_face = pango_win32_font_get_dwrite_font_face (win32font);
+ if (dwrite_font_face != NULL)
+ return cairo_dwrite_font_face_create_for_dwrite_fontface (dwrite_font_face);
+
+#endif
return cairo_win32_font_face_create_for_logfontw (&win32font->logfontw);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]