Summary: | CJK characters are not displayed | ||
---|---|---|---|
Product: | poppler | Reporter: | Koji Otani <sho> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | mty.shibata, nobuto |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
URL: | https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/769827 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patch |
Description
Koji Otani
2011-04-22 01:22:12 UTC
I'm a bit confused, we already use the language in p = FcPatternBuild(NULL, FC_FAMILY, FcTypeString, family, FC_LANG, FcTypeString, lang, NULL); shouldn't this make fontconfig return a font for the language we want? Because binding is "strong" in the setting, order in the list in it is precedence than FC_LANG value. So, fontconfig returns "DejaVu" font in top of the list. So you mean that even if i ask for a "ja" font it will give me a non "ja" font first? Are you sure that this is not a bug in fontconfig? What's the point in that feature then if it does not work? (In reply to comment #3) > So you mean that even if i ask for a "ja" font it will give me a non "ja" font > first? Yes. > Are you sure that this is not a bug in fontconfig? I don't sure that original developers of fontconfig expect this usecase. But intent of writer of this setting is clear. > What's the point in > that feature then if it does not work? If "binding" is not "strong", fontconfig behaves as you expect. More detail of this setting is following; <match target="pattern"> <test name="lang" compare="contains"> <string>ja</string> ---- (A) </test> <test qual="any" name="family"> <string>sans-serif</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>DejaVu Sans</string> <string>Takao P Gothic</string> ...... Please note (A). When "ja" font is required, this setting is applied!!! **** If "binding" is not "strong", fontconfig behaves as you expect. **** Reading this again it seems to me that the problem is not in poppler but just that the fontconfig configuration is wrong and you are trying to add a workaround to poppler to fix that problem, couldn't you just not make the binding strong and then it will work? (In reply to comment #5) > **** > If "binding" is not "strong", fontconfig behaves as you expect. > **** > > Reading this again it seems to me that the problem is not in poppler but just > that the fontconfig configuration is wrong and you are trying to add a > workaround to poppler to fix that problem, couldn't you just not make the > binding strong and then it will work? Author of this config file want to use 2 fonts (DejaVu Sans and Takao P Gothic) as 1 font that Latin Glyphs of Takao are replaced with DejaVu's. His intent is to make DejaVu the top of list fontconfig returns even when lang=ja. He writes "binding=string" on purpose. and I'm afraid that programs using fontconfig except poppler behave as he expects. This problem is also discussed in https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/759882 https://bugs.launchpad.net/ubuntu-translations/+bug/659280 https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/713950 (In reply to comment #6) > lang=ja. He writes "binding=string" on purpose. and I'm afraid that programs Sorry for my misspell. "binding=string" --> "binding=strong" Patch commited, sorry for the delay |
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.