Don't call FcPatternGetCharSet in FcSortWalk unless we need to (#17361)
This commit is contained in:
parent
799691c901
commit
355ed50b18
|
@ -590,9 +590,17 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **cs, FcBool tri
|
||||||
while (nnode--)
|
while (nnode--)
|
||||||
{
|
{
|
||||||
node = *n++;
|
node = *n++;
|
||||||
if (FcPatternGetCharSet (node->pattern, FC_CHARSET, 0, &ncs) ==
|
|
||||||
FcResultMatch)
|
/*
|
||||||
|
* Only fetch node charset if we'd need it
|
||||||
|
*/
|
||||||
|
if (trim || build_cs)
|
||||||
{
|
{
|
||||||
|
if (FcPatternGetCharSet (node->pattern, FC_CHARSET, 0, &ncs) !=
|
||||||
|
FcResultMatch)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this font isn't a subset of the previous fonts,
|
* If this font isn't a subset of the previous fonts,
|
||||||
* add it to the list
|
* add it to the list
|
||||||
|
@ -619,7 +627,6 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **cs, FcBool tri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue