Summary: | Can't modify lang in target="scan" | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Behdad Esfahbod <freedesktop> |
Component: | library | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira, freedesktop |
Version: | 2.4 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Allow to modify langset and charset |
Description
Behdad Esfahbod
2009-09-06 19:03:31 UTC
Thought about it again. We should add special rules for modifying a langset, like we have for matrix (multiply, etc). Created attachment 36555 [details] [review] Allow to modify langset and charset This patch would allows to modify the langset and the charset by e.g. <match target="scan"> <test name="family"> <string>HanaMin</string> </test> <edit name="charset" mode="assign" binding="strong"> <charset>ja</charset> </edit> <edit name="lang" mode="assign" binding="strong"> <langset>ja</langset> </edit> </match> After running fc-cache -f again, HanaMin becomes matching with serif:lang=ja say. which originally is only capable for zh-hk|zh-mo|zh-tw unexpectedly. Assigning 'ja' to charset makes no sense. Humm, oh you mean you are copying the ja.orth charset to it. I see! Interesting... Lemme poke. Ok. This is a good start. First, please keep FcVStackCharSet/LangSet and the respective FcVStack members in the same block as other types. Next, the langset handling looks about right, except that we should support 1. multiple strings, 2. add, delete, etc, as opposed to plain assign. For charset, the way you've done it is wrong. We want to be able to add/delete specific unicode characters or ranges. Thank you for the comment. let me clean up a bit. just filed a separate bug for charset as Bug#31969. some code for add/remove could be re-used for langset too. FYI. re-worked a bit based on the patch at Bug#31969: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=langset-modification-take2&id=55a446d5d8916fde7db93328ddb27174efb63f24 the syntax is similar to that. Looks good generally. Lets add FcLangSetUnion and FcLangSetSubtract and use them. (In reply to comment #8) > Looks good generally. Lets add FcLangSetUnion and FcLangSetSubtract and use > them. Updated: http://cgit.freedesktop.org/~tagoh/fontconfig/log/?h=langset-modification-take2 also added langset thing into fonts.dtd too. Hm, it seems some garbages was slipped into commits in this branch. doh. assuming that both editing langset and charset will be into fontconfig master, tha would be easier to do review the patch generated by "git diff master" on langset-modification-take2 branch, but anyway. http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=langset-modification-take3&id=b1dfeac0da6fc8f0927ae49030ed0d65aea9889f merged changes into new branch. Added some documents: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=langset-modification-take3&id=fa269cf812ee304534b0e4c44662202496008db0 Pushed to master. Please test. Thanks! That works for me. 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.