You are not logged in.

#1 2008-09-14 04:44:41

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

[SOLVED]Getting Conky to display Chinese

How do I get my conky to display Chinese? I have some Chinese songs and the mpd thing in conky just shows the artist's names as boxes. I have scim pinyin installed, by the way.

Also, on pypanel, it won't display the chinese fonts as well, though it displays the words correctly on the sonata program and title itself.

Last edited by zephyrus17 (2008-10-15 14:46:35)

Offline

#2 2008-09-15 12:02:42

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

bump

Offline

#3 2008-10-08 03:38:21

M2K360
Member
Registered: 2008-09-07
Posts: 4

Re: [SOLVED]Getting Conky to display Chinese

I have the same problem. Pypanel won't display Arabic characters.

Offline

#4 2008-10-08 18:20:25

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: [SOLVED]Getting Conky to display Chinese

Are you using a font that includes Chinese/Arabic characters? I don't think either conky or pypanel will look for an alternate font when a character is missing.

Offline

#5 2008-10-09 11:25:31

hk2717
Member
From: China
Registered: 2007-09-13
Posts: 217

Re: [SOLVED]Getting Conky to display Chinese

Nothing special, just set the proper Chinese font for conky and pypanel, then everything should work perfectly. You may search the forum for some .conkyrc and .pypanelrc examples.

Offline

#6 2008-10-09 12:49:48

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

Where can I find the font?

Offline

#7 2008-10-10 05:28:13

hk2717
Member
From: China
Registered: 2007-09-13
Posts: 217

Re: [SOLVED]Getting Conky to display Chinese

run the following to install WenQuanYi fonts:

sudo pacman -S wqy-bitmapfont
sudo pacman -S wqy-zenhei

Offline

#8 2008-10-10 07:02:06

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

I mean where in the computer can I find the font?

And for this wqy-zenhei, do I type in zenhei or wqy-zenhei in conkyrc?

Offline

#9 2008-10-10 14:27:24

hk2717
Member
From: China
Registered: 2007-09-13
Posts: 217

Re: [SOLVED]Getting Conky to display Chinese

E.G in .conkyrc:

${font WenQuanYi Zenhei:size=10:bold}

in .pypanelrc:

FONT        = "WenQuanYi Bitmap Song:size=10"

As you see, just use the font name listed in the fonts list (in lxappearance or gtk-chtheme font changing dialog for example).

Offline

#10 2008-10-10 22:57:53

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED]Getting Conky to display Chinese

Using any type of font for mpd in conky wont work, because then all fonts will appear in that particular language.

For eg, if you use Chinese font for displaying the mpd part of your conky, even when you are playing English songs or any other language, it will try to render it in Chinese - or if it doesn't have the same unicode/ascii characters, it will just display junk like it does now.

Of course, if you play only Chinese songs, then it doesn't matter.

Last edited by Inxsible (2008-10-10 22:59:12)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2008-10-10 23:45:00

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

I did think of that. But I thought some Chinese fonts have the ability to display English as well? I'll have a try and see how well it does.

Offline

#12 2008-10-14 01:04:26

hk2717
Member
From: China
Registered: 2007-09-13
Posts: 217

Re: [SOLVED]Getting Conky to display Chinese

Inxsible wrote:

Using any type of font for mpd in conky wont work, because then all fonts will appear in that particular language.

For eg, if you use Chinese font for displaying the mpd part of your conky, even when you are playing English songs or any other language, it will try to render it in Chinese - or if it doesn't have the same unicode/ascii characters, it will just display junk like it does now.

Of course, if you play only Chinese songs, then it doesn't matter.

Many Simplified Chinese fonts can dislay English, Japanese, Korean and Traditional Chinese perfectly, including WenQuanYi Zenhei and Songti fonts. So no need to worry.

Last edited by hk2717 (2008-10-14 01:07:08)

Offline

#13 2008-10-14 11:00:22

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

It didn't work. Chinese fonts are still showing boxes and special characters. Here's my conkyrc, just for reference, with the mpd part at the bottom.

###Configuration###
# maintain spacing between certain elements
use_spacer right

# set to yes if you want conky to be forked in the background
background yes

use_xft yes
override_utf8_locale no

# Xft font when Xft is enabled
xftfont Sans-12
#xftfont DejaVu Sans-8
#xftfont wenquanyi-zenhei:size=8
#xftfont DejaVu Sans Mono-8
#xftfont Bitstream Vera Sans Mono:size=8
#xftfont Andale Mono-9
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=9
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10

# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL

# Update interval in seconds
update_interval 1

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 1200 0
#maximum_width 1490

# Draw shadows for the text?
draw_shades yes

# Draw outlines that amplifies text?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 0

# border width
border_width 0

# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color DarkGrey
color3 white
color1 black
color2 888888  #dark grey
color3 CECECE  #white-ish

# Text alignment, other possible values are commented
alignment tm
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment middle_right
#alignment bottom_left

# Gap between borders of screen and text
gap_x 25
gap_y 60

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

short_units 1

###End of configuration###



# stuff after 'TEXT' will be formatted on screen

TEXT
${font bulletballs aoe:size=17}b$font   ${user_names}@$nodename
${font stylebats:size=17}2$font   ${uptime}
${font stylebats:size=17}y$font   ${battery_percent}%
${font stylebats:size=17}q$font   ${ibm_temps 0}C
${font stylebats:size=17}p$font   ${cpu cpu0}%
${font stylebats:size=17}h$font   $memperc%
${font pizzadude bullets:size=17}r$font   ${fs_used /}/ ${fs_size}
${font pizzadude bullets:size=17}z$font   ${fs_used /home}/ ${fs_size /home}
${font pizzadude bullets:size=17}N$font   ${upspeed eth0}kb/s
${font pizzadude bullets:size=17}T$font   ${downspeed eth0}kb/s

${font WenQuanYi Zenhei:size=10}${mpd_artist}$font

Last edited by zephyrus17 (2008-10-14 11:01:05)

Offline

#14 2008-10-15 12:40:29

hk2717
Member
From: China
Registered: 2007-09-13
Posts: 217

Re: [SOLVED]Getting Conky to display Chinese

I don't think the grammar of your conkyrc is correct. At least, '$font' should be '${font}'. Please, search the forum for some conkyrc examples.

Offline

#15 2008-10-15 12:42:09

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

Ok. I'll have a tweak and see.

Offline

#16 2008-10-15 14:46:04

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: [SOLVED]Getting Conky to display Chinese

You're right, hk2717, adding the brackets did help. Thanks!

Offline

Board footer

Powered by FluxBB