Write ranges using a [start finish) format
To show closed and open ends.
This commit is contained in:
parent
4c9101f704
commit
d09ba38589
|
@ -65,7 +65,7 @@ _FcValuePrintFile (FILE *f, const FcValue v)
|
|||
break;
|
||||
case FcTypeRange:
|
||||
r = FcRangeCanonicalize (v.u.r);
|
||||
fprintf (f, "(%g, %g)", r.u.d.begin, r.u.d.end);
|
||||
fprintf (f, "[%g %g)", r.u.d.begin, r.u.d.end);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ FcNameConvert (FcType type, FcChar8 *string)
|
|||
v.type = FcTypeVoid;
|
||||
break;
|
||||
case FcTypeRange:
|
||||
if (sscanf ((char *) string, "(%lg %lg)", &b, &e) != 2)
|
||||
if (sscanf ((char *) string, "[%lg %lg)", &b, &e) != 2)
|
||||
{
|
||||
v.u.d = strtod ((char *) string, &p);
|
||||
if (p != NULL && p[0] != 0)
|
||||
|
@ -531,7 +531,7 @@ FcNameUnparseValue (FcStrBuf *buf,
|
|||
if (FcDoubleCmpEQ (r.u.d.begin, r.u.d.end))
|
||||
sprintf ((char *) temp, "%g", r.u.d.begin);
|
||||
else
|
||||
sprintf ((char *) temp, "(%g %g)", r.u.d.begin, r.u.d.end);
|
||||
sprintf ((char *) temp, "[%g %g)", r.u.d.begin, r.u.d.end);
|
||||
return FcNameUnparseString (buf, temp, 0);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue