Font fallback doesn't work

Bug #1189352 reported by Penk Chen
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
The Savilerow project
Fix Released
Undecided
Unassigned
Ubuntu UI Toolkit
Fix Released
Undecided
Unassigned

Bug Description

Font fallback doesn't work correctly on current components:

1. Install extra fonts (Droid for example)

    apt-get install fonts-droid
    fc-cache -fv

2. Open browser app, and go to "http://tw.yahoo.com/mobile/"

3. Chinese characters doesn't display correctly ( Please see the attached screenshot )

Version number:

libqt5core5:armhf 5.0.2+dfsg1-3ubuntu1~raring1~test4
libqt5quick5:armhf 5.0.2-2ubuntu1~raring1~test3
libqt5webkit5-qmlwebkitplugin:armhf 5.0.1-0ubuntu2~raring1~test3
qtdeclarative5-ubuntu-ui-toolkit-plugin:armhf 0.1.46daily13.06.04ubuntu.unity.next-0ubuntu1
webbrowser-app 0.20daily13.06.04ubuntu.unity.next-0ubuntu1

Revision history for this message
Penk Chen (penk) wrote :
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

It seems it’s not affecting only the browser, but the whole shell, apps and OSK.
I installed fonts-droid, and I set the default language to Chinese (zh_CN.UTF-8, in /etc/environment and /etc/default/locale), rebooted the phone, and invalid unicode characters are displayed instead of Chinese symbols.
I’d swear this used to work, I’m pretty sure I ran the same test successfully a few weeks ago to test internationalization.

Revision history for this message
Penk Chen (penk) wrote :

On a side note, if you set the specified font path in FontLoader, it shows.

Text {
        FontLoader { id: droid; source: "/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf" }
        font.family: (droid.status === FontLoader.Ready) ? droid.name : ""
 text: "中文 testing"
}

Revision history for this message
Bill Filler (bfiller) wrote :

Tested on build 159 on Galaxy Nexus and works fine. Follow these steps

1) sudo apt-get install fonts-droid
2) sudo locale-gen zh_CN.UTF-8
3) sudo vi /etc/default/local change LANG="en_US.UTF-8" to LANG="zh_CN.UTF-8"
4) sudo vi /etc/environment change LANG="zh_CN.UTF-8" and LANGUAGE="zh_CN"
5) reboot

I see proper fonts displayed in http://tw.yahoo.com/mobile/ and in the shell and apps.

Changed in ubuntu-ui-toolkit:
status: Confirmed → Invalid
Revision history for this message
John McAleely (john.mcaleely) wrote :

Using 160 on a Manta, I can follow the steps in #4 and see chinese looking characters in places where I have observed squares when I was trying a slightly different way of getting this to work.

However, the keyboard characters look distinctly arabic, is that currently expected? (Or do I not recognise characters for what they are...?)

Revision history for this message
Rex Tsai (chihchun) wrote :

The keybaord in distinctly arabic is another issue, maliit switch to arabic keyboard layout for Chinese locale. maliit need proper config to work.

Revision history for this message
Rex Tsai (chihchun) wrote :

Please reproduce the issue by running fc-cache again after you follow comment #4[1].

$ sudo fc-cache -f -r -s -v

It seems apt-get triggered fontconfig update it's cache before the config[2] file is in place. Please updatethe cache and reboot.

After reboot you will see the chinese word as box, it seems like qt5 fontdatabase does not handle the language fallback correctly.

[1] https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1189352/comments/4
[2] /etc/fonts/conf.d/65-droid-sans-fonts.conf

Changed in ubuntu-ui-toolkit:
status: Invalid → Confirmed
Revision history for this message
Matt Fischer (mfisch) wrote :

This bug still occurs as of Sept 12. Please follow the steps from Rex to repro it.

Revision history for this message
Chris Wayne (cwayne) wrote :

I'm no longer seeing this bug in Trusty images. Switching the locale to zh_CN and rebooting seems to 'just work' now

Chris Wayne (cwayne)
Changed in sevilerow:
status: New → Fix Committed
Alex Chiang (achiang)
affects: sevilerow → savilerow
Chris Wayne (cwayne)
Changed in savilerow:
status: Fix Committed → Fix Released
Changed in ubuntu-ui-toolkit:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.