[Fontconfig-bugs] [Bug 105415] fontconfing 2.13 makes bold font when it's not expected to
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Mar 10 06:34:05 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=105415
--- Comment #5 from Akira TAGOH <akira at tagoh.org> ---
For backward compatibility:
diff --git a/src/fcname.c b/src/fcname.c
index 79e413e..b9933df 100644
--- a/src/fcname.c
+++ b/src/fcname.c
@@ -293,6 +293,7 @@ FcNameConvert (FcType type, FcChar8 *string)
FcMatrix m;
double b, e;
char *p;
+ int i;
v.type = type;
switch ((int) v.type) {
@@ -330,13 +331,18 @@ FcNameConvert (FcType type, FcChar8 *string)
case FcTypeRange:
if (sscanf ((char *) string, "[%lg %lg]", &b, &e) != 2)
{
- v.u.d = strtod ((char *) string, &p);
- if (p != NULL && p[0] != 0)
+ if (FcNameConstant(string, &i))
{
- v.type = FcTypeVoid;
- break;
+ v.u.r = FcRangeCreateDouble (i, i);
+ } else {
+ v.u.d = strtod ((char *) string, &p);
+ if (p != NULL && p[0] != 0)
+ {
+ v.type = FcTypeVoid;
+ break;
+ }
+ v.type = FcTypeDouble;
}
- v.type = FcTypeDouble;
}
else
v.u.r = FcRangeCreateDouble (b, e);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20180310/eb918993/attachment.html>
More information about the Fontconfig-bugs
mailing list