Because the loop body is just 'break' the loop never loops and at most
one leading space is skipped. Remove the body to allow the loop to
continue. Found with ClangTidy.
There seems to be a lot of config files using fullname property in the world.
To keep the backward compatibility, fullname property is back to a cache at
the scan matching phase but will be rebuilt once it is done according to family
and style property in the pattern no matter what changes one made in fullname
property during that.
Ref. https://bugzilla.redhat.com/show_bug.cgi?id=1902881
OpenType spec says that the Regular descriptor would generally be
omitted from fullname. but some fonts doesn't follow on it.
So decided to construct a fullname from family and style instead of
relying on the meta data in a font.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/208
"fontversion" used to be modified to sort out fonts as a technique.
But that lost the original purpose to do the version control between
releases.
This change adds the dedicated property into the cache.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/226
In some cases, non-English languages might appears first in current order.
and when having English name with non-English language ID like Google Noto CJK TC,
English name with English language ID will be dropped due to duplicate.
This fixes that issue.
Most of functionality should be moved to FcFreeTypeQueryAll()
for varfonts now though, if doing the same to FcFreeTypeQuery()
returns Null pattern because of inappropriate masking.
This might be not that big deal for varfonts support. but
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/162
Reported by Kevin Scott
The expression "1 << 31" will cause UBSAN to complain with this error message:
runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
The same operation on unsigned types is fine, however. This CL replaces the
strings "1 <<" with "1U <<".
In 161c738 I switched from linear name scanning to binary searching.
That, however, ignored the fact that there might be more than one
name table entry for each pair we want to query.
To fix that and retain bsearch, I now get all name entries first,
sort them, and use for bsearching.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=105756
This makes scaning Voto Serif GX twice slower though, since we are
creating and sorting the list for each instance. In the next commit,
I'll share this list across different instances to fix this.
VotoSerifGX has over 500 named instances, which means it also has over a thousand
name table entries. So we were looking for names for over 500 pattern, looking for
some thirty different name-ids, and using linear search across the 1000 entries!
Makes scanning VotoSerifGX three times faster. The rest is probably the lang
matching, which can also be shared across named-instances. Upcoming.