diff options
-rw-r--r-- | pango/fonts.c | 15 | ||||
-rw-r--r-- | tests/fonts/DejaVuSans-Bold.ttf | bin | 0 -> 705684 bytes | |||
-rw-r--r-- | tests/fonts/README | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/pango/fonts.c b/pango/fonts.c index 99262942..1f0ee626 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -2374,11 +2374,24 @@ pango_font_family_default_is_variable (PangoFontFamily *family) } static void +pango_font_family_default_list_faces (PangoFontFamily *family, + PangoFontFace ***faces, + int *n_faces) +{ + if (faces) + *faces = NULL; + + if (n_faces) + *n_faces = 0; +} + +static void pango_font_family_class_init (PangoFontFamilyClass *class G_GNUC_UNUSED) { class->is_monospace = pango_font_family_default_is_monospace; class->is_variable = pango_font_family_default_is_variable; class->get_face = pango_font_family_real_get_face; + class->list_faces = pango_font_family_default_list_faces; } static void @@ -2449,7 +2462,7 @@ pango_font_family_real_get_face (PangoFontFamily *family, pango_font_family_list_faces (family, &faces, &n_faces); face = NULL; - if (name == NULL) + if (name == NULL && n_faces > 0) { face = faces[0]; } diff --git a/tests/fonts/DejaVuSans-Bold.ttf b/tests/fonts/DejaVuSans-Bold.ttf Binary files differnew file mode 100644 index 00000000..970a0412 --- /dev/null +++ b/tests/fonts/DejaVuSans-Bold.ttf diff --git a/tests/fonts/README b/tests/fonts/README index 5faba25d..1a57e614 100644 --- a/tests/fonts/README +++ b/tests/fonts/README @@ -3,6 +3,7 @@ test-layout tests. Cantarell-VF.otf: Cantarell DejaVSans.ttf: DejaVu Sans +DejaVSans-Bold.ttf: DejaVu Sans Bold DejaVSansMono.ttf: DejaVu Sans Mono emoji-subset.ttf: subset of Noto Color Emoji droid-sans-subset.ttf: subset of Droid Sans Japanese |