Can you justify the first change beyond what's in the commit message please? A "if ('en')" piece of code in fontconfig sounds *really* suspicious to me.
On Mon, Sep 21, 2020 at 12:04 AM GitLab Mirror <gitlab-mirror@xxxxxxxxxxxxxxxxxxxxxx> wrote:
src/fcfreetype.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
New commits:
commit dbef9d10de19288e56f58b7c1aa880d447e6ae85
Author: Akira TAGOH <akira@xxxxxxxxx>
Date: Mon Sep 21 14:51:22 2020 +0900
Make sure a combination of family and familylang is available
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 3bdf92b..b9bb09f 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1675,6 +1675,11 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
free (family);
goto bail1;
}
+ if (!FcPatternObjectAddString (pat, FC_FAMILYLANG_OBJECT, (FcChar8 *) "en"))
+ {
+ free (family);
+ goto bail1;
+ }
free (family);
++nfamily;
}
commit 5a291467a78b59bc9240f2d4ca2f14590e2e936c
Author: Akira TAGOH <akira@xxxxxxxxx>
Date: Mon Sep 21 14:48:43 2020 +0900
Add Regular style when no meta data available to guess a style
This makes sure that fullname can be constructed at least even if a style is missing
and "Regular" is omitted for fullname so this change won't affect in that case.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/259
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 0001f38..3bdf92b 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1625,13 +1625,26 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
++nfamily;
}
- if (!variable && !nstyle && face->style_name &&
- FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
+ if (!variable && !nstyle)
{
- if (FcDebug () & FC_DBG_SCANV)
- printf ("using FreeType style \"%s\"\n", face->style_name);
+ const FcChar8 *style_regular = (const FcChar8 *) "Regular";
+ const FcChar8 *ss;
- if (!FcPatternObjectAddString (pat, FC_STYLE_OBJECT, (FcChar8 *) face->style_name))
+ if (face->style_name &&
+ FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
+ {
+ if (FcDebug () & FC_DBG_SCANV)
+ printf ("using FreeType style \"%s\"\n", face->style_name);
+
+ ss = (const FcChar8 *) face->style_name;
+ }
+ else
+ {
+ if (FcDebug () & FC_DBG_SCANV)
+ printf ("applying default style Regular\n");
+ ss = style_regular;
+ }
+ if (!FcPatternObjectAddString (pat, FC_STYLE_OBJECT, ss))
goto bail1;
if (!FcPatternObjectAddString (pat, FC_STYLELANG_OBJECT, (FcChar8 *) "en"))
goto bail1;
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig