Red Hat Bugzilla – Bug 1004732
[vi] Ugly font rendering for Vietnamese in anaconda
Last modified: 2015-12-17 20:35:45 EST
Created attachment 794229 [details]
Tested on Fedora-20-Alpha-TC3-x86_64-netinst.iso
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.
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]
$ fc-list "DejaVu Sans:style=Book" lang
$ fc-list "Cantarell" lang
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]
pango-view --font="Cantarell" --waterfall --background=#ededed vi.txt &
$ 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
$ cat vi.txt
Bạn muốn dùng ngôn ngữ nào khi cài đặt?
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]
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
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]
> 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
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'
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 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