关于conky字体问题。大侠们救命

系统字体配置、中文显示和输入法问题
回复
xukui44
帖子: 25
注册时间: 2008-10-16 11:21

关于conky字体问题。大侠们救命

#1

帖子 xukui44 » 2009-09-12 19:44

我是个ubuntu的菜鸟,才玩了没几天,但是已喜欢了要喷血了。
每实现一个功能都要兴奋好好久。

这不安装了一个conky,中文全部都是方块,我无从下手,大家指点下怎么解决:
截图:
Screenshot.png
Screenshot.png (133.87 KiB) 查看 5356 次
配置文件如下:

use_spacer right
use_xft yes
font Microsoft YaHei:size=8
xftfont Microsoft YaHei:size=8
#xftfont WenQuanYi Zen Hei:pixelsize=12
override_utf8_locale yes
update_interval 1.0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 206 5
maximum_width 400
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 10
gap_y 30
cpu_avg_samples 2
uppercase no # set to yes if you want all text to be in uppercase

TEXT
${font Microsoft YaHei:style=Bold:pixelsize=30}${alignc}${time %H:%M:%S}
${font Microsoft YaHei:pixelsize=18}${alignc}${time %b%d日 星期%a}${font Microsoft YaHei:pixelsize=12}
${color #ffd700}${hr 1}$color
${color #98c2c7}主机名:${color #db7093} $alignr$nodename
${color #98c2c7}内核: ${color #db7093}$alignr$kernel
${color #98c2c7}已开机: ${color #db7093}$alignr$uptime
${color #98c2c7}IP地址: ${color #db7093} ${alignr} ${addr eth0}
${color #98c2c7}CPU使用率: ${color #db7093} $alignr$cpu%
${color #78af78}$cpubar
${color #ddaa00} ${top name 1}$alignr ${top cpu 1}
${color lightgrey} ${top name 2}$alignr ${top cpu 2}
${color lightgrey} ${top name 3} $alignr${top cpu 3}
${color #98c2c7}物理内存:${color #4169e1}$alignr ${color}$mem ${color #98c2c7}/${color}$memmax${color #4169e1}${color #db7093}$memperc%
${color #78af78}${membar}
${color #98c2c7}根分区: ${color}${alignr}${fs_free /} / ${fs_size /}
${color #78af78}${fs_bar 4 /}
${color #98c2c7}Home分区: ${color}${alignr}${fs_free /home} / ${fs_size /home}
${color #78af78}${fs_bar 4 /home}
${color #98c2c7}下载速度:${color} ${downspeed eth0} k/s
${color #98c2c7}上传速度:${color} ${upspeed eth0} k/s
${color #ffd700}${hr 1}$color
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 关于conky字体问题。大侠们救命

#2

帖子 leeaman » 2009-09-12 19:47

换别的中文字体看看?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
xukui44
帖子: 25
注册时间: 2008-10-16 11:21

Re: 关于conky字体问题。大侠们救命

#3

帖子 xukui44 » 2009-09-12 19:49

系统自带的sans我也试试,还是不行
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 关于conky字体问题。大侠们救命

#4

帖子 leeaman » 2009-09-12 19:51

wenquanyi zenhei 试试看,我觉得是你的字体名字不对
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 关于conky字体问题。大侠们救命

#5

帖子 eexpress » 2009-09-12 20:08

font Microsoft YaHei:size=8
去掉先

xftfont 名,用fc-list找正确的
● 鸣学
头像
jxhow
帖子: 5859
注册时间: 2008-10-24 22:02
来自: 浙江

Re: 关于conky字体问题。大侠们救命

#6

帖子 jxhow » 2009-09-12 20:21

代码: 全选

font Microsoft YaHei:size=8
xftfont Microsoft YaHei:size=8
#xftfont WenQuanYi Zen Hei:pixelsize=12
换成

代码: 全选

font WenQuanYi Zen Hei:size=8
#xftfont Microsoft YaHei:size=8
xftfont WenQuanYi Zen Hei:pixelsize=12
或者你安装个雅黑字体也可以
http://sb.google.com/ 提问前 请在右上角搜索一下
xukui44
帖子: 25
注册时间: 2008-10-16 11:21

Re: 关于conky字体问题。大侠们救命

#7

帖子 xukui44 » 2009-09-12 20:36

好。我都试试。
xukui44
帖子: 25
注册时间: 2008-10-16 11:21

Re: 关于conky字体问题。大侠们救命

#8

帖子 xukui44 » 2009-09-12 20:45

我试过6楼的了,还是老样子了。

5的大哥,我按你的操作了。选了己个,还是一样
显示内容如下:
Umpush:style=Oblique
Nimbus Sans L:style=Regular Italic
Japan:style=Regular
WenQuanYi Bitmap Song:style=Bold
Bitstream Vera Sans Mono:style=Bold
Tarablus:style=Regular
AlBattar:style=Regular
URW Palladio L:style=Roman
Century Schoolbook L:style=Bold Italic
Lohit Punjabi:style=Regular
Norasi:style=Oblique
Sindbad:style=Regular
TlwgTypewriter:style=Oblique
AlManzomah:style=Regular
Bitstream Vera Sans:style=Oblique
TlwgMono:style=Medium
Tlwg Typo:style=Medium
Nimbus Sans L:style=Bold
OpenSymbol:style=Regular
Norasi:style=BoldOblique
UnDotum,은 돋움:style=Regular
Tlwg Typo:style=BoldOblique
URW Chancery L:style=Medium Italic
Rehan:style=Regular
Bitstream Vera Sans:style=Roman
Bitstream Charter:style=Bold Italic
Mukti Narrow,মুক্তি:style=Regular
文泉驿等宽正黑,文泉驛等寬正黑,WenQuanYi Zen Hei Mono:style=中等,Medium
Nimbus Roman No9 L:style=Regular
AR PL UMing TW:style=Light
Khalid:style=Regular
Rasheeq,Rasheeq\-Bold:style=Bold
Loma:style=Oblique
Century Schoolbook L:style=Bold
Century Schoolbook L:style=Italic
Mukti Narrow,মুক্তি পাতনা,Mukti Narrow Bold:style=Regular,Bold
AR PL UMing HK:style=Light
AR PL UMing CN:style=Light
Norasi:style=BoldItalic
Nimbus Sans L:style=Regular
FreeSerif:style=Bold,polkrepko
Granada:style=Regular
URW Palladio L:style=Italic
Garuda:style=Oblique
Mallige:style=Bold
Nimbus Sans L:style=Bold Condensed
TlwgTypewriter:style=Medium
UnBatang,은 바탕:style=Bold
URW Gothic L:style=Demi
FreeSerif:style=Italic,ležeče
AlArabiya:style=Regular
Nimbus Roman No9 L:style=Medium Italic
AlHor:style=Regular
Bitstream Charter:style=Regular
Garuda:style=BoldOblique
Nimbus Mono L:style=Bold Oblique
Kinnari:style=Medium
Sazanami Mincho,さざなみ明朝:style=Regular,Mincho-Regular
FreeSans:style=Medium,navadno
Norasi:style=Italic
Dingbats:style=Regular
TlwgMono:style=Bold
Mashq,Mashq\-Bold:style=Bold
Loma:style=BoldOblique
AlMohanad:style=Regular
Bitstream Vera Sans Mono:style=Oblique
Waree:style=Oblique
Nimbus Roman No9 L:style=Medium
Nimbus Sans L:style=Bold Italic
Nada:style=Regular
Courier 10 Pitch:style=Bold Italic
AR PL UKai TW MBE:style=Book
文鼎PL简报宋,AR PL SungtiL GB:style=Regular
文泉驿正黑,文泉驛正黑,WenQuanYi Zen Hei:style=中等,Medium
Nimbus Mono L:style=Regular
FreeSans:style=Oblique,ležeče
Umpush:style=Book
Umpush:style=Bold
Norasi:style=Regular
Bitstream Charter:style=Italic
Petra:style=Regular
URW Gothic L:style=Book
Furat:style=Regular
Cortoba:style=Regular
Bitstream Vera Sans:style=Bold
Kinnari:style=Oblique
Sawasdee:style=Bold
AlYarmook:style=Regular
TlwgTypewriter:style=Bold
Nice:style=Regular
FreeMono:style=Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,BoldOblique,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,polkrepko ležeče,Lodi etzana
Rachana:style=Regular
Waree:style=BoldOblique
Tlwg Typist:style=BoldOblique
Jet:style=Regular
Metal:style=Regular
Courier 10 Pitch:style=Italic
AR PL UKai CN:style=Book
AR PL UKai HK:style=Book
TlwgTypewriter:style=BoldOblique
Salem:style=Regular
Bitstream Vera Serif:style=Roman
Purisa:style=Medium
AR PL UKai TW:style=Book
Tlwg Typist:style=Bold
Hor:style=Regular
Tlwg Typo:style=Oblique
Bitstream Vera Sans Mono:style=Bold Oblique
Kinnari:style=BoldItalic
Kinnari:style=BoldOblique
Bitstream Vera Sans:style=Bold Oblique
Nimbus Sans L:style=Regular Condensed Italic
FreeSans:style=Bold,polkrepko
Norasi:style=Bold
URW Bookman L:style=Demi Bold
Electron:style=Regular
URW Bookman L:style=Light
Shado:style=Regular
FreeMono:style=Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,polkrepko,đậm,Lodia
URW Gothic L:style=Demi Oblique
Standard Symbols L:style=Regular
Mallige:style=Normal
Bitstream Vera Sans Mono:style=Roman
Hani:style=Regular
FreeMono:style=Normal,obyčejné,Standard,Κανονικά,Medium,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,navadno,thường,Arrunta
ori1Uni,utkal:style=Medium
Sawasdee:style=Regular
Ostorah:style=Regular
FreeSerif:style=Medium,navadno
Kayrawan:style=Regular
Courier 10 Pitch:style=Regular
Vemana2000,Pothana2000:style=Pothana2000,Regular
Lohit Hindi:style=Regular
Dimnah:style=Regular
URW Palladio L:style=Bold
Nimbus Sans L:style=Regular Condensed
Sawasdee:style=BoldOblique
文鼎PL細上海宋,AR PL Mingti2L Big5:style=Regular,Reguler
Loma:style=Bold
Loma:style=Book
Sazanami Gothic,さざなみゴシック:style=Regular,Gothic-Regular
URW Bookman L:style=Light Italic
Umpush:style=Light
Phetsarath OT:style=Regular
WenQuanYi Bitmap Song:style=Regular
Century Schoolbook L:style=Roman
TlwgMono:style=Oblique
AlMateen,AlMateen\-Bold:style=Bold
FreeSerif:style=BoldItalic,polkrepko ležeče
Nimbus Roman No9 L:style=Regular Italic
TlwgMono:style=BoldOblique
Haramain:style=Regular
Courier 10 Pitch:style=Bold
Garuda:style=Book
Garuda:style=Bold
Lohit Tamil:style=Regular
DejaVu Sans:style=Bold
DejaVu Sans:style=Book
Graph:style=Regular
Kinnari:style=Italic
URW Gothic L:style=Book Oblique
URW Palladio L:style=Bold Italic
AlMothnna,AlMothnna\-Bold:style=Bold
Sharjah:style=Regular
Tholoth:style=Regular
Kinnari:style=Bold
Sawasdee:style=Oblique
UnDotum,은 돋움:style=Bold
Nagham:style=Regular
Nimbus Mono L:style=Regular Oblique
Bitstream Vera Serif:style=Bold
Lohit Gujarati:style=Regular
UnBatang,은 바탕:style=Regular
DejaVu Sans Mono:style=Book
DejaVu Sans Mono:style=Bold
Umpush:style=BoldOblique
Umpush:style=LightOblique
Nimbus Mono L:style=Bold
FreeSans:style=BoldOblique,polkrepko ležeče
AR PL UMing TW MBE:style=Light
Tlwg Typist:style=Medium
Bitstream Charter:style=Bold
Mashq:style=Regular
Ouhod,Ouhod\-Bold:style=Bold
FreeMono:style=Cursiva,kurzíva,kursiv,Πλάγια,Oblique,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,ležeče,nghiêng,Etzana
Waree:style=Book
Waree:style=Bold
Nimbus Sans L:style=Bold Condensed Italic
URW Bookman L:style=Demi Bold Italic
Tlwg Typist:style=Oblique
Tlwg Typo:style=Bold
Arab:style=Regular
DejaVu Serif:style=Book
DejaVu Serif:style=Bold
founderznd
帖子: 129
注册时间: 2009-08-16 17:34

Re: 关于conky字体问题。大侠们救命

#9

帖子 founderznd » 2009-09-12 22:22

Ubuntu系统默认是没有微软字体的,因为版权问题。
你的代码应该是COPY的吧?
你代码里面所以得微软字体全部换成 文泉驿正黑,就行了
头像
a9z1
帖子: 91
注册时间: 2007-02-06 17:06

Re: 关于conky字体问题。大侠们救命

#10

帖子 a9z1 » 2009-09-14 15:23

我也是你的这种情况,解决方法很简单和flash不显示中文一样!
conky中文乱码 的解决方法
打开配置文件:
cd /etc/fonts/conf.d/
sudo gedit 49-sansserif.conf

将最下面的<string>sans-serif</string>
改为 <string>sans</string>

:em11
qeprgvfpg
帖子: 40
注册时间: 2009-10-20 2:53

Re: 关于conky字体问题。大侠们救命

#11

帖子 qeprgvfpg » 2009-11-02 0:09

${font WenQuanYi Zen Hei:pixelsize=12}${color #ffd700}今天天气:${execi 3600 python ~/getweather.py}
${font WenQuanYi Zen Hei:pixelsize=12}${color #ffd700}明天天气:${execi 3600 python ~/getweathert.py}
${font WenQuanYi Zen Hei:pixelsize=12}${color #ffd700}后天天气:${execi 3600 python ~/getweathertt.py}
请问各位大虾帮帮忙写个脚本。谢谢
加个风速
sxsexe
帖子: 11
注册时间: 2007-12-11 11:59

Re: 关于conky字体问题。大侠们救命

#12

帖子 sxsexe » 2010-01-10 16:56

10楼正解
feather32281
帖子: 2
注册时间: 2010-06-20 2:42

Re: 关于conky字体问题。大侠们救命

#13

帖子 feather32281 » 2010-06-20 16:26

a9z1 写了:我也是你的这种情况,解决方法很简单和flash不显示中文一样!
conky中文乱码 的解决方法
打开配置文件:
cd /etc/fonts/conf.d/
sudo gedit 49-sansserif.conf

将最下面的<string>sans-serif</string>
改为 <string>sans</string>

:em11
照10楼这么做,我怎么打开了一个新建的文件???
头像
playeryang
帖子: 249
注册时间: 2009-04-04 12:55
来自: 四川...泸州||江苏...镇江

Re: 关于conky字体问题。大侠们救命

#14

帖子 playeryang » 2010-06-20 16:50

给你一个conky,我也是新手,这是我前一段时间研究了N个人的教程和代码写的,里面有详细的注释,自己研究研究吧,这个conky是适合上面那个背景的,别的背景不一定好看,你还得自己改改颜色什么的,祝你早日搞定,呵呵
附件
Screenshot111.png
My Conky.zip
(5.51 KiB) 已下载 234 次
回复