<div dir="ltr">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.<div><br></div><div>Thanks,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 21, 2020 at 12:04 AM GitLab Mirror <<a href="mailto:gitlab-mirror@kemper.freedesktop.org">gitlab-mirror@kemper.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> src/fcfreetype.c | 28 +++++++++++++++++++++++-----<br>
1 file changed, 23 insertions(+), 5 deletions(-)<br>
<br>
New commits:<br>
commit dbef9d10de19288e56f58b7c1aa880d447e6ae85<br>
Author: Akira TAGOH <<a href="mailto:akira@tagoh.org" target="_blank">akira@tagoh.org</a>><br>
Date: Mon Sep 21 14:51:22 2020 +0900<br>
<br>
Make sure a combination of family and familylang is available<br>
<br>
diff --git a/src/fcfreetype.c b/src/fcfreetype.c<br>
index 3bdf92b..b9bb09f 100644<br>
--- a/src/fcfreetype.c<br>
+++ b/src/fcfreetype.c<br>
@@ -1675,6 +1675,11 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,<br>
free (family);<br>
goto bail1;<br>
}<br>
+ if (!FcPatternObjectAddString (pat, FC_FAMILYLANG_OBJECT, (FcChar8 *) "en"))<br>
+ {<br>
+ free (family);<br>
+ goto bail1;<br>
+ }<br>
free (family);<br>
++nfamily;<br>
}<br>
commit 5a291467a78b59bc9240f2d4ca2f14590e2e936c<br>
Author: Akira TAGOH <<a href="mailto:akira@tagoh.org" target="_blank">akira@tagoh.org</a>><br>
Date: Mon Sep 21 14:48:43 2020 +0900<br>
<br>
Add Regular style when no meta data available to guess a style<br>
<br>
This makes sure that fullname can be constructed at least even if a style is missing<br>
and "Regular" is omitted for fullname so this change won't affect in that case.<br>
<br>
Fixes <a href="https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/259" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/259</a><br>
<br>
diff --git a/src/fcfreetype.c b/src/fcfreetype.c<br>
index 0001f38..3bdf92b 100644<br>
--- a/src/fcfreetype.c<br>
+++ b/src/fcfreetype.c<br>
@@ -1625,13 +1625,26 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,<br>
++nfamily;<br>
}<br>
<br>
- if (!variable && !nstyle && face->style_name &&<br>
- FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)<br>
+ if (!variable && !nstyle)<br>
{<br>
- if (FcDebug () & FC_DBG_SCANV)<br>
- printf ("using FreeType style \"%s\"\n", face->style_name);<br>
+ const FcChar8 *style_regular = (const FcChar8 *) "Regular";<br>
+ const FcChar8 *ss;<br>
<br>
- if (!FcPatternObjectAddString (pat, FC_STYLE_OBJECT, (FcChar8 *) face->style_name))<br>
+ if (face->style_name &&<br>
+ FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)<br>
+ {<br>
+ if (FcDebug () & FC_DBG_SCANV)<br>
+ printf ("using FreeType style \"%s\"\n", face->style_name);<br>
+<br>
+ ss = (const FcChar8 *) face->style_name;<br>
+ }<br>
+ else<br>
+ {<br>
+ if (FcDebug () & FC_DBG_SCANV)<br>
+ printf ("applying default style Regular\n");<br>
+ ss = style_regular;<br>
+ }<br>
+ if (!FcPatternObjectAddString (pat, FC_STYLE_OBJECT, ss))<br>
goto bail1;<br>
if (!FcPatternObjectAddString (pat, FC_STYLELANG_OBJECT, (FcChar8 *) "en"))<br>
goto bail1;<br>
_______________________________________________<br>
Fontconfig mailing list<br>
<a href="mailto:Fontconfig@lists.freedesktop.org" target="_blank">Fontconfig@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/fontconfig" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/fontconfig</a><br>
</blockquote></div>