Add an API to get the binding of values The bindings of families in a match or sort pattern are important in the selection of default fonts for each language. Currently the only way to determine these bindings is to use FcFont(Set)Sort or FcFont(Set)Match. Providing an API to get the bindings would help applications writing their own sort/match functions that may have different priorities for the properties or have additional information that can be used to optimize the sort/match. I guess FcValueGetBinding is not really feasible as FcValue is a public struct and FcValueGetBinding would seem a bit strange against FcPatternAdd(,,FcValue,) and FcPatternAddWeak(,,FcValue,). FcPatternGetBinding(FcPattern *p, const char *object, int id, FcValueBinding *b) may be an option. Another option would be FcPatternGetWithBinding(FcPattern *p, const char *object, int id, FcValue *v, FcValueBinding *b) which would save the duplicate work of finding the (private) FcValueList twice.
Lets go with FcPatternGetWithBinding.
This API will also be useful to allow detecting fallback fonts. See bug 90330.
We would love to have this for WebKit as well, since we keep getting font rendering complaints that boil down to not hardcoding font aliases like Chrome does.
Akira, can you work on this?
Sure. let me try to find a time to work on this.
Proposed changes for this: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz19375
LGTM. Let's get this in. Thanks.
Akira, are you planning to commit this?
(In reply to Michael Catanzaro from comment #8) > Akira, are you planning to commit this? Yes. but not soonish so far. I'm planning to make 2.12.2 shortly so maybe after that.
(In reply to Michael Catanzaro from comment #8) > Akira, are you planning to commit this?
Thanks for ping. will work on it shortly.
merged into the main repo.
Yay! Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.