Summary: | RFE: help write locale-specific tests | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Nicolas Mailhot <nicolas.mailhot> |
Component: | library | Assignee: | Akira TAGOH <akira> |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | enhancement | ||
Priority: | medium | CC: | akira, fontconfig-bugs, fonts-bugs |
Version: | 2.6 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Nicolas Mailhot
2008-11-27 01:30:42 UTC
lang-matching rule isn't necessarily based on the string comparison. when using "eq" operator, the mapping table in FcLangSet is compared as long as the lang matches to what fontconfig has as the orthography files. otherwise the string comparison is used for last resort. When using "contains" operator, the minimal requirements in the mapping tables are compared if it's provided as the orthography files. otherwise the string comparison is used though, it still matches even if only one of values contains the territory but not in other. e.g. "contains" operator considers "en" matches "en-us" and vice versa. So what you need to do for: (In reply to comment #0) > but we do not really want to match every locale containing "ze". We want to > match every ze-foo locale, not jze-foo or foo-ze is: <test name="lang" compare="contains"> <string>ze</string> </test> in that case. "contains" may still helps if any apps adds the lang from current locale with ll-cc but the orth file is ll.orth. Added an example: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz18726 Please review. Added some comments about compare stuff and committed into git master. |
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.