From b67ec1c309b76876d1f58b72c07b175398d6ac4b Mon Sep 17 00:00:00 2001 From: Andre Bossard Date: Wed, 26 Feb 2020 22:25:41 +0100 Subject: [PATCH 1/2] does it fix that? --- src/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/font.c b/src/font.c index 80e03d2d5..cf3364241 100644 --- a/src/font.c +++ b/src/font.c @@ -757,7 +757,8 @@ gdip_get_cairo_font_face (GpFont *font) { if (!font->cairofnt) { FcPattern *pattern = FcPatternBuild ( - FcPatternDuplicate (font->family->pattern), + NULL, + FC_FAMILY, FcTypeString, font->face, FC_SLANT, FcTypeInteger, ((font->style & FontStyleItalic) ? FC_SLANT_ITALIC : FC_SLANT_ROMAN), FC_WEIGHT, FcTypeInteger, ((font->style & FontStyleBold) ? FC_WEIGHT_BOLD : FC_WEIGHT_MEDIUM), NULL); From c103e0441189ff2764111aaf10d4fdb29dcbfaf5 Mon Sep 17 00:00:00 2001 From: Andre Bossard Date: Thu, 27 Feb 2020 09:50:11 +0100 Subject: [PATCH 2/2] reverted to previous metrics --- tests/testfont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testfont.c b/tests/testfont.c index 43229e3e4..b3578e9de 100644 --- a/tests/testfont.c +++ b/tests/testfont.c @@ -911,7 +911,7 @@ static void test_createFontFamilyFromName () status = GdipCreateFontFamilyFromName (CodeNewRoman, collection, &family); assertEqualInt (status, Ok); - verifyFontFamily (family, "Code New Roman", 1884, 514, 2398, "Code New Roman", 1884, 514, 2398); + verifyFontFamily (family, "Code New Roman", 2059, 430, 2489, "Code New Roman", 1901, 483, 2384); // Negative tests. status = GdipCreateFontFamilyFromName (NULL, collection, &family);