Can't display Chinese words in wallpaper

Bug #135869 reported by Jose Sun
2
Affects Status Importance Assigned to Milestone
Weather wallpaper
Confirmed
Low
Raúl González Duque

Bug Description

I've translate this program to Chinese, but it's can't display Chinese character in wallpaper,may be you can fix the problem.

Revision history for this message
Raúl González Duque (zootropo) wrote :

Did you install the mo file at /usr/share/locale/zh_TW/LC_MESSAGES?
I suppose you have LC_ALL="zh_TW.utf8"?
Does it print any exceptions if you run it from the command line?

Changed in weather-wallpaper:
assignee: nobody → zootropo
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Jose Sun (josesun) wrote :

Of course I installed.
I can see my translate in system tray icon, but Chinese characters disappear in the wallpaper.

Revision history for this message
Raúl González Duque (zootropo) wrote :

Thank you Jose.
It seems to be because of the convert command from imagemagick, which is the one I use to create the text for the wallpaper.
I'll take a look at it to see what can be done.

Changed in weather-wallpaper:
status: Incomplete → Confirmed
Revision history for this message
Raúl González Duque (zootropo) wrote :

Ok, I think it may be solved specifying the font to use when calling convert to add the text.
What font does a zh system use by default? Can you attach the file?

Revision history for this message
Jose Sun (josesun) wrote :

Thank you for your reply.
We use "AR PL New Sung" in zh-TW normally.
You can get one from "http://ftp.kh.edu.tw/odp/ODOFonts/OpenFonts/".

Revision history for this message
Raúl González Duque (zootropo) wrote :

Ok, it was because of that stupid thing. If we have an image called image.png and execute this command at its folder:
convert image.png -fill white -pointsize 100 -draw "text 200,200 '取回預報 中'" image.png
image2, which should be just the same as the previous image but with the text 取回預報 中 at 200x200, doesn't show any text.

But if we execute
convert image.png -font /path/to/the/font/odosung.ttc -fill white -pointsize 100 -draw "text 200,200 '取回預報 中'" image2.png
i.e., if we tell convert to use a font which has chinese characters, it does work.

convert should be smart enough to select the default font to use depending on the locales or the text to be written.

Anyway, I'll add a dialog to select the font for version 0.3.

Thank you very much for your help and patience, Jose.

Revision history for this message
Jose Sun (josesun) wrote :

Thanks for your hard work.^^

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.