Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu 字体设置:使用Windows 字体

Ubuntu 字体设置:使用Windows 字体基础知识Sans-serif=无衬线体=黑体:并不是具体一款字体,而是一类字体,选择它其实等于选择这类字体中优先级最高的那款字体。Serif=衬线体=白体:同上Monospace=等宽字体,意思是字符宽度相同:同上点阵字体=位图字体无衬线体更适合电脑屏幕阅读,衬线体适合打印。——因为衬线可以使得人视线平齐于一行。也就是说不会读破行。中文显示时有不同的方式,一方面因为中文本身拥有的横和同高度就可以导致这种平齐。行距对中文更重要。1. 安装字体sudo apt-get install ttf-mscorefonts-installer #微软字体
sudo apt-get install xfonts-wqy  #文泉驿-点阵宋体
cd ~
wget http://www.stchman.com/tools/MS_fonts/tahoma.zip #Tahoma 字体
sudo unzip -d /usr/share/fonts/truetype/msttcorefonts ~/tahoma.zip
sudo fc-cache -f -v
rm -f ~/tahoma.zip
fc-cache -f -s -v #刷新字体缓存2. 进入 “Advanced settings" 设置(如果没有安装,执行 sudo apt-get install gnome-tweak-tool)如下设置:3. 配置:注意使用文泉驿的视觉习惯工具把网页上的英文和中文字体都调整清晰, 点 Create, 按说明保存好。本人调的是 Tahoma 第一位,wenquanyi  bitmap 第二位, 这样英文和中文都没问题。Linux字体字体文件存放路径/usr/share/fonts/  #系统字体,需要root权限才能操作~/.fonts #用户字体,随便怎么搞,推荐配置文件路径/etc/fonts/fonts.conf #系统配置文件,需要root权限才能操作,对需要输入root密码的程序有效~/.fonts.conf #用户配置文件,随便怎么搞,只对当前用户运行的程序有效命令fc-cache -fv #通常复制字体进~/.fonts就会自动刷新字体,如果没有,用这个命令,如果复制进的是/usr/share/fonts/,用sudo fc-cache -fvfc-match sans-serif #抓取当前用户sans-serif类字体优先级最高的那款字体fc-match serif #抓取当前用户serif类字体优先级最高的那款字体fc-match monospace #抓取当前用户monospace类字体优先级最高的那款字体4. 上一步配置对 Firefox 和 Thunderbird 无效, 再设置 ~/.fonts.conf, 在 <fontconfig> 中加入:    <match target="font">
        <edit mode="assign" name="autohint">
            <bool>false</bool>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="hinting">
            <bool>true</bool>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="hintstyle">
            <const>hintfull</const>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="antialias">
            <bool>false</bool>
        </edit>
    </match>
<!-- 大字体的时候启用抗锯齿 -->
<match target="font" >
    <test name="size" qual="any" compare="more">
        <double>12</double>
    </test>
    <edit name="antialias" mode="assign">
        <bool>true</bool>
    </edit>
</match>
<match target="font" >
    <test name="pixelsize" qual="any" compare="more">
        <double>16</double>
    </test>
    <edit name="antialias" mode="assign">
        <bool>true</bool>
    </edit>
</match>5. 登出 或 重启系统 就可看到完整的效果(由于图片受到压缩,请在图片上点右键,在新窗口中查看)更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2本文永久更新链接地址