Add a warning for blank in fonts.conf

and remove the unnecessary code for parsing blanks
This commit is contained in:
Akira TAGOH 2015-06-17 16:29:08 +09:00
parent 33fd436a3e
commit 46b2c62faa
1 changed files with 7 additions and 0 deletions

View File

@ -1260,8 +1260,11 @@ static void
FcParseBlank (FcConfigParse *parse) FcParseBlank (FcConfigParse *parse)
{ {
int n = FcVStackElements (parse); int n = FcVStackElements (parse);
#if 0
FcChar32 i, begin, end; FcChar32 i, begin, end;
#endif
FcConfigMessage (parse, FcSevereWarning, "blank doesn't take any effect anymore. please remove it from your fonts.conf");
while (n-- > 0) while (n-- > 0)
{ {
FcVStack *v = FcVStackFetch (parse, n); FcVStack *v = FcVStackFetch (parse, n);
@ -1273,10 +1276,13 @@ FcParseBlank (FcConfigParse *parse)
} }
switch ((int) v->tag) { switch ((int) v->tag) {
case FcVStackInteger: case FcVStackInteger:
#if 0
if (!FcBlanksAdd (parse->config->blanks, v->u.integer)) if (!FcBlanksAdd (parse->config->blanks, v->u.integer))
goto bail; goto bail;
break; break;
#endif
case FcVStackRange: case FcVStackRange:
#if 0
begin = (FcChar32) v->u.range->begin; begin = (FcChar32) v->u.range->begin;
end = (FcChar32) v->u.range->end; end = (FcChar32) v->u.range->end;
if (begin <= end) if (begin <= end)
@ -1287,6 +1293,7 @@ FcParseBlank (FcConfigParse *parse)
goto bail; goto bail;
} }
} }
#endif
break; break;
default: default:
FcConfigMessage (parse, FcSevereError, "invalid element in blank"); FcConfigMessage (parse, FcSevereError, "invalid element in blank");