zoukankan      html  css  js  c++  java
  • Ubuntu flash中文乱码解决方法

    在Ubuntu系统下,使用Firefox等浏览器的flash plugin时,比如Google音乐听歌时,会出现中文显示为乱码的情况,而一般英文是正常显示的。这里给出一个解决方案和见说明一下背后的原理。
    下面给 出一个解决方案:
    打开配置文件:
    cd /etc/fonts/conf.d/
    sudo vi 49-sansserif.conf 

    修改 edit节点,将<string>sans-serif</string>
    改为 <string>sans</string>  或者 <string>宋体</string>之类的 

    <match target="pattern">
    <test qual="all" name="family" compare="not_eq">
    <string>sans-serif</string>
    </test>
    <test qual="all" name="family" compare="not_eq">
    <string>serif</string>
    </test>
    <test qual="all" name="family" compare="not_eq">
    <string>monospace</string>
    </test>
    <edit name="family" mode="append_last">
    <string>sans-serif</string>   #这里改为<--- <string>sans</string>
    </edit>
    </match>

    原 理:sans-serif字体是无衬线字体(滑体);而serif是有衬线的,在字的笔画开始及結束的地方有额外的装饰。而可以看出,我们平时所用的 Georgia、Times New Roman等就属于Serif字体,而Arial、Tahoma、Verdana等则属于Sans Serif字体。对中文而言,同样存在这两大种类,很明显,宋体、细明体(繁体中常用)等就属于Serif,而黑体、幼圆等则属于Sans Serif。
    注:在 西方国家罗马字体正营中,字体分为两大种类:Sans Serif和Serif,打字机体虽然也属于 Sans Serif,但由于是等宽字体,所以另外独立出 Monospace这一种类,例如在Web中,表示代码时常常要使用等宽字体,在终端中也通常使用该字体。Serif的意思是,在字的笔画开始及結束的地 方有额外的装饰,而且笔画的粗细会因直橫的不同而有不同。相反的,Sans Serif则沒有这些额外的装饰,笔画粗细大致差不多。
    实际的 应用:Serif的字体容易辨认,因此易读性较高。反之Sans Serif则教醒目。像宣传品、海报类,为求醒目,它的短篇的段落也会采用Sans Serif字体。但在书籍、报刊杂志,正文有相当篇幅的情形下,则应采用Serif字体来减轻读者阅读上的负担。^.^

    欲了解更多原理,参考资料:
    http://forum.ubuntu.org.cn/viewtopic.php?f=73&t=189458
    http://yx.takeback.net/121/serif-font.html
    http://en.wikipedia.org/wiki/Sans-serif
    http://forum.ubuntu.org.cn/viewtopic.php?f=8&t=144940&start=0
    http://zhidao.baidu.com/question/121430576

  • 相关阅读:
    vim中自动添加文件的作者、时间信息、版本等
    linux shell ipaddress
    java ant学习
    ganglia rpm安装
    深入分析 Java 中的中文编码问题
    javaIO调优
    超强的vim设置
    linux中core文件的生成和配置
    C和C++ 语言动态内存分配
    Linux的常用命令
  • 原文地址:https://www.cnblogs.com/starimpact/p/1747075.html
Copyright © 2011-2022 走看看