summaryrefslogtreecommitdiff
path: root/pango/pangowin32-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-13 22:59:46 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-10-31 19:52:36 -0400
commit40a805478dfa8988315fd8b7f8515af65c3f90c7 (patch)
tree401a68e86b3a2ac189211a80f18b0f513a740947 /pango/pangowin32-fontmap.c
parent044d31030af43722e79c582fc3c4d3e4ace9d9a3 (diff)
downloadpango-40a805478dfa8988315fd8b7f8515af65c3f90c7.tar.gz
Add pango_font_face_get_family
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r--pango/pangowin32-fontmap.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 1c0b70f2..ccdd69bd 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -690,6 +690,8 @@ create_standard_family (PangoWin32FontMap *win32fontmap,
new_face->cached_fonts = NULL;
+ new_face->family = new_family;
+
new_family->faces = g_slist_append (new_family->faces, new_face);
p = p->next;
@@ -1633,12 +1635,12 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
win32face->cached_fonts = NULL;
- win32family =
+ win32face->family = win32family =
pango_win32_get_font_family (win32fontmap,
pango_font_description_get_family (win32face->description));
if ((lfp->lfPitchAndFamily & 0xF0) == FF_MODERN)
win32family->is_monospace = TRUE;
-
+
win32family->faces = g_slist_append (win32family->faces, win32face);
PING (("name=%s, length(faces)=%d",
@@ -1711,6 +1713,14 @@ pango_win32_face_is_synthesized (PangoFontFace *face)
return win32face->is_synthetic;
}
+static PangoFontFamily *
+pango_win32_face_get_family (PangoFontFace *face)
+{
+ PangoWin32Face *win32face = PANGO_WIN32_FACE (face);
+
+ return PANGO_FONT_FAMILY (win32face->family);
+}
+
G_DEFINE_TYPE (PangoWin32Face, pango_win32_face, PANGO_TYPE_FONT_FACE)
static void
@@ -1743,6 +1753,7 @@ pango_win32_face_class_init (PangoFontFaceClass *class)
class->get_face_name = pango_win32_face_get_face_name;
class->list_sizes = pango_win32_face_list_sizes;
class->is_synthesized = pango_win32_face_is_synthesized;
+ class->get_family = pango_win32_face_get_family;
}
static void