zoukankan      html  css  js  c++  java
  • 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)

    如下设置:

    Ubuntu 字体设置:使用Windows 字体

    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 -fv

    fc-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. 登出 或 重启系统 就可看到完整的效果(由于图片受到压缩,请在图片上点右键,在新窗口中查看)

  • 相关阅读:
    Running ASP.NET Applications in Debian and Ubuntu using XSP and Mono
    .net extjs 封装
    ext direct spring
    install ubuntu tweak on ubuntu lts 10.04,this software is created by zhouding
    redis cookbook
    aptana eclipse plugin install on sts
    ubuntu open folderpath on terminal
    ubuntu install pae for the 32bit system 4g limited issue
    EXT Designer 正式版延长使用脚本
    用 Vagrant 快速建立開發環境
  • 原文地址:https://www.cnblogs.com/jacker1979/p/4693504.html
Copyright © 2011-2022 走看看