Bug 1004732
Summary: | [vi] Ugly font rendering for Vietnamese in anaconda | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mike FABIAN <mfabian> |
Component: | gtk3 | Assignee: | Matthias Clasen <mclasen> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | anaconda-maint-list, ccecchi, dshea, fonts-bugs, g.kaviyarasu, jonathan, lijli, mclasen, mfabian, mkolman, psatpute, sbueno, vanmeeuwen+fedora, vpodzime |
Target Milestone: | --- | Keywords: | i18n |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-12-18 01:35:45 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
The problem still exists in Fedora-20-Beta-TC6-x86_64-DVD.iso. (In reply to Mike FABIAN from comment #1) > The problem still exists in Fedora-20-Beta-TC6-x86_64-DVD.iso. Any idea on which fonts may be missing? Created attachment 817785 [details]
fonts-used-by-anaconda-in-fedora-20-tc6.png
mfabian@ari:~/bugs/redhat/1004732
$ fc-list "DejaVu Sans:style=Book" lang
:lang=aa|ab|af|ar|ast|av|ay|az-az|az-ir|ba|bm|be|bg|bi|bin|br|bs|bua|ca|ce|ch|chm|co|cs|cu|cv|cy|da|de|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|ff|fur|fy|ga|gd|gl|gn|gv|ha|haw|he|ho|hr|hu|hy|ia|ig|id|ie|ik|io|is|it|iu|ka|kaa|ki|kk|kl|ku-am|ku-ir|kum|kv|kw|ky|la|lb|lez|ln|lo|lt|lv|mg|mh|mi|mk|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|sah|sco|se|sel|sh|shs|sk|sl|sm|sma|smj|smn|sms|so|sq|sr|ss|st|sv|sw|tg|tk|tl|tn|to|tr|ts|tt|tw|tyv|uk|uz|ve|vi|vo|vot|wa|wen|wo|xh|yap|yi|yo|zu|ak|an|ber-dz|ber-ma|crh|csb|ee|fat|fil|hsb|ht|hz|jv|kab|kj|kr|ku-iq|ku-tr|kwm|lg|li|mn-mn|ms|na|ng|nv|ota|pap-an|pap-aw|qu|rn|rw|sc|sd|sg|sn|su|ty|za
mfabian@ari:~/bugs/redhat/1004732
$ fc-list "Cantarell" lang
:lang=aa|af|av|ay|ba|be|bg|bi|br|bs|bua|ca|ce|ch|co|cs|cv|cy|da|de|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|ga|gd|gl|gv|ho|hr|hu|ia|id|ie|ik|io|is|it|kaa|ki|kk|kl|kum|kv|ky|la|lb|lez|lt|lv|mg|mh|mk|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ru|se|sel|sh|sk|sl|sma|smj|smn|so|sq|sr|ss|st|sv|sw|tk|tl|tn|tr|ts|tt|tyv|uz|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|mn-mn|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za
mfabian@ari:~/bugs/redhat/1004732
$
The screen shot attached to comment#3 shows a list of fonts used by anaconda. “Cantarell” does not support Vietnamese, “DejaVu Sans” does support Vietnamese (as shown by fc-list in comment#3). That makes me guess what we see is a mix of “Cantarell” and “DejaVu Sans”, “Cantarell” is used as long as it has the the glyphs, for the glyphs missing in “Cantarell”, “DejaVu Sans” is used as a fallback. Created attachment 817811 [details]
cantarell-font-used-for-vietnamese-pango-view-falls-back-to-dejavu-sans.png
pango-view --font="Cantarell" --waterfall --background=#ededed vi.txt &
mfabian@ari:~/bugs/redhat/1004732
$ grep fonts /proc/$(pidof pango-view)/maps
7ffa60db2000-7ffa60e62000 r--p 00000000 fd:01 2496700 /usr/share/fonts/dejavu/DejaVuSans.ttf
7ffa60e62000-7ffa60e76000 r--p 00000000 fd:01 2525534 /usr/share/fonts/abattis-cantarell/Cantarell-Regular.otf
mfabian@ari:~/bugs/redhat/1004732
$ cat vi.txt
Bạn muốn dùng ngôn ngữ nào khi cài đặt?
mfabian@ari:~/bugs/redhat/1004732
$
I tried the above on my main workstation running f19.
When pango-view is used to display that Vietnamese text using
the “Cantarell” font, it falls back to “DejaVu Sans” for the glyphs
missing in “Cantarell”.
Created attachment 817844 [details]
pango-view-cantarell-specified-on-command-line-run-in-ja_JP-and-vi_VN-locale.png
Left screen shot:
LANG=ja_JP.UTF-8 pango-view --font="Cantarell" --waterfall --background=#ededed vi.txt
Right screen shot:
LANG=vi_VN.UTF-8 pango-view --font="Cantarell" --waterfall --background=#ededed vi.txt
(LC_* unset).
So if the locale is non-Vietnamese, pango-view tries Cantarell
and falls back to “DejaVu Sans” for the glyphs lacking in Cantarell.
But if the locale is Vietnamese, pango-view avoids Cantarell completely
and renders the whole line in “DejaVu Sans”.
(In reply to Mike FABIAN from comment #6) > Created attachment 817844 [details] > pango-view-cantarell-specified-on-command-line-run-in-ja_JP-and-vi_VN-locale. > png > > Left screen shot: > > LANG=ja_JP.UTF-8 pango-view --font="Cantarell" --waterfall > --background=#ededed vi.txt > > Right screen shot: > > LANG=vi_VN.UTF-8 pango-view --font="Cantarell" --waterfall > --background=#ededed vi.txt > > (LC_* unset). > > So if the locale is non-Vietnamese, pango-view tries Cantarell > and falls back to “DejaVu Sans” for the glyphs lacking in Cantarell. > > But if the locale is Vietnamese, pango-view avoids Cantarell completely > and renders the whole line in “DejaVu Sans”. I'm not sure we can tell Pango to "reinitialize" itself on locale selection change. I believe that the Cantarell font should support Vietnamese. Reassigning (In reply to Vratislav Podzimek from comment #8) > I believe that the Cantarell font should support Vietnamese. Reassigning Yes, that would be a very good solution. The problem still exists in Fedora-Workstation-netinst-x86_64-21-Alpha-TC5 Cantarell still does not support Vietnamese on Fedora-Live-Workstation-x86_64-22_Beta-3.iso i.e. the problem is unchanged. This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. (In reply to Mike FABIAN from comment #4) > The screen shot attached to comment#3 shows a list of fonts used > by anaconda. “Cantarell” does not support Vietnamese, “DejaVu Sans” does > support Vietnamese (as shown by fc-list in comment#3). > > That makes me guess what we see is a mix of “Cantarell” and “DejaVu Sans”, > “Cantarell” is used as long as it has the the glyphs, for the glyphs > missing in “Cantarell”, “DejaVu Sans” is used as a fallback. Same problem as with urdu, for font substitution will only work properly in anaconda if anaconda tags its text runs with the locale they're intended for Is this bug still exist in F23? Is not please close else move to F23. The bug still exists unchanged in the final release of Fedora 23. Created attachment 1100936 [details]
vietnamese-font-rendering-on-the-welcome-page-fedora-23-release.png
Vietnamese is 7% translated in Fedora 23 anaconda. Is there a reason to keep support for it in anaconda? (In reply to David Shea from comment #17) > Vietnamese is 7% translated in Fedora 23 anaconda. Is there a reason to keep > support for it in anaconda? I guess not, 7% is really not much. Solving the the font problem in a generic way (I.e. not just by adding the missing glyphs for Vietnamese to the Cantarelle font but by making switching to fonts appropriate for the selected language work) might benefit other languages as well (like Urdu for example). Created attachment 1101562 [details]
language switch test
We need support in gtk to make this work. I've attached a small script that will change the language between English and Vietnamese and then open a dialog with Vietnamese text (I apologize if it's gibberish, I just ran "Hello, world!" through google translate). On the language switch I do everything we can (as far as I know) to indicate that the language has changed: I update the LANG environment variable, I call setlocale with the new language, and I update the language in the Pango context for the original window. Even with all of this the ế and ớ characters render in a different font from the rest of the string, and the dialog's Pango context uses the original language.
In order for language switching like this to work we need some way of indicating to Gtk (or Pango?) that the global language to use for new widgets has changed.
Adding <span lang=... tags everywhere is not feasible.
Not something that is realistically going to happen. It is a lot more complicated than you think. You have to reformat all strings, which may require data that is no longer available, etc, etc |
Created attachment 794229 [details] font-rendering-comparison-vietnamese-anaconda-gedit.png Tested on Fedora-20-Alpha-TC3-x86_64-netinst.iso See screenshot. The screenshot shows that the text renders nicely in gedit using the "DejaVu Sans" font. But in anaconda, the glyphs for ố ữ ặ are much less bold than the other glyphs.