After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638328 - Simplified Chinese glyphs on ScheduleCalendar is missing when the locale is zh_CN
Simplified Chinese glyphs on ScheduleCalendar is missing when the locale is z...
Status: RESOLVED FIXED
Product: nanny
Classification: Deprecated
Component: General
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: Roberto Majadas
nanny-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-30 08:18 UTC by Hsin-Yi Chen
Modified: 2012-03-24 08:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
According Cairo's FAQ, Using pango instead of Cairo's toy font api (2.24 KB, patch)
2010-12-30 18:26 UTC, Hsin-Yi Chen
none Details | Review

Description Hsin-Yi Chen 2010-12-30 08:18:18 UTC
os: Ubuntu 10.10
nanny version 2.29.4

As attachment, each regulars is actually a word. it should display Monday, Tuesday, Wends day Thursday, Friday, Saturday, Sunday in Simplified Chinese. The text is generated by client/gnome/admin/src/ScheduleCalendar.py

There is no font configuration in nanny codes, so it uses the sans-serif font family according the fontconfig configuration.

In this case, fontconfig defined several fonts in sans-serif font family, file:/etc/fonts/conf.avail/69-language-selector-zh-cn.conf

                        <string>DejaVu Sans</string>
                        <string>Bitstream Vera Sans</string>
                        <string>WenQuanYi Micro Hei</string>
                        <string>WenQuanYi Zen Hei</string>

The first 2 fonts are western fonts, 3th and 4th are Chinese fonts, Ideally, the Chinese font will be matched by fontconfig if the character in the user interface is a Chinese word. the western fonts will be skipped.

Except Result:

Schedule Calendar of Nanny should uses WenQuanYi Micro Hei or WenQuanYi Zen Hei

Actaul Result:

Schedule Calendar of Nanny uses DejaVu Sans font even it is in zh_CN locales, 

Suggested solution:

1. get font by fontconfig api in zh_CN locale
2. set font matched font
Comment 1 Hsin-Yi Chen 2010-12-30 18:26:03 UTC
Created attachment 177271 [details] [review]
According Cairo's FAQ, Using pango instead of Cairo's toy font api 

According Cairo's FAQ, Using pango instead of Cairo's toy font api

More details on http://cairographics.org/FAQ/#using_pango
Comment 2 Roberto Majadas 2011-06-01 16:01:04 UTC
Your last patch is in master. Thanks Hsin-Yi :)