Summary: | Writing name.preferredFamilyname of a font in <prefer> tag mixes up with name.font{,sub}Family | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Mingye Wang (Arthur2e5) <arthur200126> |
Component: | library | Assignee: | fontconfig-bugs |
Status: | RESOLVED DUPLICATE | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop |
Version: | 2.11 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Mingye Wang (Arthur2e5)
2016-03-11 23:17:36 UTC
Looks like it's something around src/fcfreetype.c:1408. Working on some duct tape. I don't see why that happens. Ie, why is weight ignored? You are using master, right? It's not ignored, it just mixed up font(sub)family and preferred(sub)family, from an outsider's perspective. Just an initial wild guess without looking at the source: When looking for "Noto Sans CJK SC" "Regular", fc looked at the name first and found "Noto Sans CJK SC" "Demilight", and then found a "Regular" on "Demilight", so it considered it a good match. I am actually using 2.11.1, but well... I was reading the code for master on cgit. Ubuntu 16.04 should be using 2.11.0. Oh let me change the version tag. Noto Sans CJK Regular actually looks different from the rest -- its preferredSubfamily is omitted from "name". > 2.11.1 That's ancient. That version did not support DemiLight. That's your issue. Update to something newer and it will all work. *** This bug has been marked as a duplicate of bug 81453 *** Still FYI, Noto CJK have made a different OS/2 weight mapping choices for Thin (Extralight?) that gives 250. That seems to be intended to workaround a Windows GDI 'bug' (or feature) that it generates faux bold for everything with OS/2 weight < 250. This might need to be taken into account when dealing with OpenType/TrueType weights. Regarding the "ancient" version... https://www.freedesktop.org/wiki/Software/fontconfig/ still points to 2.11.1. https://www.freedesktop.org/software/fontconfig/release/ gives 2.11.94 though. Perhaps someone forgot to update that page? Yeah, not the best updated project website... |
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.