Let me show it with an example.
Currently:
$ fc-match symbol
symbol.ttf: "Symbol" "Regular"
$ fc-match symbol --sort | head -n 1
Symbol.pfb: "Symbol" "Regular"
$ fc-match symbol --sort --all | head -n 1
symbol.ttf: "Symbol" "Regular"
I want to make sure the above three commands all return the same font.
Ie. I want to make sure FcFontMatch() always returns the first font
from FcFontSort(). As such, never trim first font.
{
FcBool ret = FcFalse;
FcCharSet *cs;
+ int i;
cs = 0;
if (trim || csp)
goto bail;
}
- while (nnode--)
+ for (i = 0; i < nnode; i++)
{
FcSortNode *node = *n++;
FcBool adds_chars = FcFalse;
* If this font isn't a subset of the previous fonts,
* add it to the list
*/
- if (!trim || adds_chars)
+ if (!i || !trim || adds_chars)
{
FcPatternReference (node->pattern);
if (FcDebug () & FC_DBG_MATCHV)