Summary: | Do the right thing for intermixed edit and test elements | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Behdad Esfahbod <freedesktop> |
Component: | library | Assignee: | Akira TAGOH <akira> |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira, fontconfig-bugs |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Behdad Esfahbod
2013-01-15 00:53:20 UTC
proposed fix for this: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz59385 maybe I should export FcSubst* as FcPrivate but static function, instead of own structure to stock the FcTest and FcEdit to reorder. <match> <test name="lang" compare="eq"> <string>ja</string> </test> <edit name="family" mode="append"> <string>foo</string> </edit> <test name="family" compare="contains"> <string>foo</string> </test> <edit name="family" mode="assign"> <string>bar</string> </edit> </match> before applying this change: Loading config file /home/tagoh/.config/fontconfig/conf.d/00-bz59385.conf Add Subst match pattern any lang Equal "ja" pattern any family Contains "foo" edit Edit family Append "foo"; Edit family Assign "bar"; ... FcConfigSubstitute test pattern any lang Equal "ja" FcConfigSubstitute test pattern any family Contains "foo" No match after applying: Loading config file /home/tagoh/.config/fontconfig/conf.d/00-bz59385.conf Add Subst match pattern any lang Equal "ja" edit Edit family Append "foo"; Add Subst match pattern any family Contains "foo" edit Edit family Assign "bar"; ... FcConfigSubstitute test pattern any lang Equal "ja" Substitute match pattern any lang Equal "ja" edit Edit family Append "foo"; Append list before "sans-serif"(w) [insert here] Append list after "sans-serif"(w) "foo"(w) FcConfigSubstitute editPattern has 3 elts (size 16) family: "sans-serif"(w) "foo"(w) lang: "ja"(w) prgname: "lt-fc-match"(s) FcConfigSubstitute test pattern any family Contains "foo" Substitute match pattern any family Contains "foo" edit Edit family Assign "bar"; Append list before "sans-serif"(w) "foo"(w) [insert here] Append list after "sans-serif"(w) "foo"(w) "bar"(w) FcConfigSubstitute editPattern has 3 elts (size 16) family: "sans-serif"(w) "bar"(w) lang: "ja"(w) prgname: "lt-fc-match"(s) After a bit cleanup, committed into 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.