1 From 198358dd8ff858c9e36531a7406ccb2246ae77b7 Mon Sep 17 00:00:00 2001
2 From: Akira TAGOH <akira@tagoh.org>
3 Date: Mon, 12 Mar 2018 11:49:58 +0900
4 Subject: Allow the constant names in the range
6 https://bugs.freedesktop.org/show_bug.cgi?id=105415
8 src/fcname.c | 34 +++++++++++++++++++++++++++++-----
9 1 file changed, 29 insertions(+), 5 deletions(-)
11 diff --git a/src/fcname.c b/src/fcname.c
12 index 79e413e..15fb659 100644
15 @@ -330,13 +330,37 @@ FcNameConvert (FcType type, FcChar8 *string)
17 if (sscanf ((char *) string, "[%lg %lg]", &b, &e) != 2)
19 - v.u.d = strtod ((char *) string, &p);
20 - if (p != NULL && p[0] != 0)
22 + size_t len = strlen ((const char *) string);
27 + if (sc && ec && sscanf ((char *) string, "[%s %[^]]]", sc, ec) == 2)
29 - v.type = FcTypeVoid;
31 + if (FcNameConstant ((const FcChar8 *) sc, &si) &&
32 + FcNameConstant ((const FcChar8 *) ec, &ei))
33 + v.u.r = FcRangeCreateDouble (si, ei);
40 + v.type = FcTypeDouble;
41 + if (FcNameConstant (string, &si))
43 + v.u.d = (double) si;
45 + v.u.d = strtod ((char *) string, &p);
46 + if (p != NULL && p[0] != 0)
47 + v.type = FcTypeVoid;
50 - v.type = FcTypeDouble;
57 v.u.r = FcRangeCreateDouble (b, e);
61 From 4699406a68321179b14fae7412f828e2f37a7033 Mon Sep 17 00:00:00 2001
62 From: Akira TAGOH <akira@tagoh.org>
63 Date: Wed, 14 Mar 2018 18:31:30 +0900
64 Subject: Add the value of the constant name to the implicit object in the
67 For objects which has been changed the object type to FcTypeRange.
69 https://bugs.freedesktop.org/show_bug.cgi?id=105415
72 1 file changed, 4 insertions(+)
74 diff --git a/src/fcname.c b/src/fcname.c
75 index 15fb659..c9320ae 100644
78 @@ -490,6 +490,10 @@ FcNameParse (const FcChar8 *name)
79 if (!FcPatternAddBool (pat, c->object, c->value))
83 + if (!FcPatternAddInteger (pat, c->object, c->value))