[Fontconfig-bugs] [Bug 94505] New: Writing name.preferredFamilyname of a font in <prefer> tag messes up with name.font{, sub}Family
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Mar 11 23:17:36 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=94505
Bug ID: 94505
Summary: Writing name.preferredFamilyname of a font in <prefer>
tag messes up with name.font{,sub}Family
Product: fontconfig
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: library
Assignee: fontconfig-bugs at lists.freedesktop.org
Reporter: arthur200126 at gmail.com
QA Contact: freedesktop at behdad.org
Many True/OpenType fonts, like Noto Sans CJK ("notocjk") in this example, uses
a pattern in "name" table where:
* name.fontFamily gives the full name (with style) of the font and Subfamily is
always Regular
* name.preferredFamily gives the actual family name and Subfamily is the actual
weight
Fontconfig doesn't seem to be capable of handling such a case. Specifically,
given a config file which <prefer>s notocjk:
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans CJK SC</family>
<family>Noto Sans CJK TC</family>
</prefer>
</alias>
Fontconfig will produce a match like:
$ fc-match --verbose
Pattern has 38 elts (size 48)
family: "Noto Sans CJK SC"(s) "Noto Sans CJK SC DemiLight"(s)
familylang: "en"(s) "en"(s)
style: "DemiLight"(w) "Regular"(w)
stylelang: "en"(w) "en"(w)
fullname: "Noto Sans CJK SC DemiLight"(w)
fullnamelang: "en"(w)
[...]
Now here is the problem. By preferring the preferredFamily "Noto Sans CJK SC",
fontconfig ended up also preferring "Noto Sans CJK SC DemiLight", and matched
"Noto Sans CJK SC DemiLight" "Regular" for the implicit "Regular".
See https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1468027
for a context of this problem.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20160311/2486ba3d/attachment.html>
More information about the Fontconfig-bugs
mailing list