`
kenby
  • 浏览: 723778 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Archlinux下安装雅黑字体

阅读更多

1. 删除cairo、fontconfig、freetype2、libxft四个软件包:

sudo pacman -Rd cairo fontconfig freetype2 libxft

用ubuntu版的cairo、fontconfig、freetype2、libxft替换之,这四个软件的ARU链接为:

cairo-ubuntu

fontconfig-ubuntu

freetype2-ubuntu

libxft-ubuntu

分别下载四个软件对应的PKGBUILD和相关文件,使用makepkg命令构建软件包,然后

sudo pacman -U ***.pkg.tar.gz

安装软件包

 

2. 下载雅黑字体,有两个文件myth.ttf和mythbd.ttf, 复制到/usr/share/fonts/vista,然后在该目录下执行:

sudo mkfontdir

sudo mkfontscale

并在 /etc/X11/xorg.conf 里加入一行:

FontPath “/usr/share/fonts/vista”

最后创建字体缓存 :

fc-cache -fv

 

3. 编辑/etc/fonts/local.conf文件,把全部内容替换为:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<!-- /etc/fonts/local.conf file to configure system-wide font access -->
<fontconfig>
        <!--
        Target dots per inch.
        Uncomment following block and change 96 to your LCD or CRT actual dpi
        -->
        <match target="pattern" >
                <edit name="dpi" mode="assign" >
                        <double>90</double>
                </edit>
        </match>

        <!--  
        Enable LCD sub-pixel rendering.

        Pay attention, subpixel rendering is exploited only on LCD not CRT.
        Enable it will add some color fringing on the edge of font.It is not 
        always a bad thing,please sit away from your screen further enough 
        untill you can't observe the fringing.

        Some people's LCD subpixel layout that is not rgb order will get
        opposite result,there are four patterns horizontal rgb/bgr and 
        vertical rgb/bgr, but horizontal rgb is the most common.
        Change rgb -> yours.

        If you are using CRT, you may benefit from it.

        If it disturb you or you prefer to the normal grayscale antialiasing, 
        change rgb -> none and you should also disable it for each place it 
        appear. 

        If you are using LCD, i recommand you enable it, or you can't enjoy ClearType-like
        looking.
        -->
        <match target="font" >
                <edit name="rgba" mode="assign" >
                        <const>rgb</const>
                </edit>
        </match>

        <!--
        Default Fonts setting for those free fonts that probably have been existed 
        in your system, e.g. ttf-bitstream-vera and ttf-dejavu etc.
        MS Vista fonts will not use this setting. 
        -->
        <match target="font" >
                <edit name="antialias" mode="assign" >
                        <bool>true</bool>
                </edit>
                <edit name="autohint" mode="assign" >
                        <bool>true</bool>
                </edit>
                <edit name="hinting" mode="assign" >
                        <bool>false</bool>
                </edit>
                <edit name="hintstyle" mode="assign" >
                        <const>hintslight</const>
                </edit>
        </match>

        <!--
        Mark common families with their generics so we'll get
        something reasonable
        -->
        <!--
        Sans-serif faces
        -->
        <alias>
                <family>Segoe UI</family>
                <family>Calibri</family>
                <family>Candara</family>
                <family>Corbel</family>

                <!-- vista new Simplified Chinese font --> 
                <family>Microsoft YaHei</family>
                <family>微软雅黑</family>

                <!-- vista new Tranditonal Chinese font -->
                <family>Microsoft JhengHei</family>
                <family>微軟正黑體</family>

                <!-- vista new Japanese font -->
                <family>Meiryo</family>

                <!-- vista new Korean font -->
                <family>Malgun Gothic</family>
        </alias>

        <!--
        Serif faces
        -->
        <alias>
                <family>Cambria</family>
                <family>Constantina</family>

                <family>SimSunNew</family>
                <family>宋体New</family>
                <family>PMingLiUNew</family>
                <family>新細明體New</family>
                <default>
                        <family>serif</family>
                </default>
        </alias>

        <!--
        Monospace faces
        -->
        <alias>
                <family>Consolas</family>
                <family>Courier New</family>
                <default>
                        <family>monospace</family>
                </default>
        </alias>

        <!--
        Provide required aliases for standard names
        -->
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Segoe UI</family>
                        <family>Calibri</family>			
                        <family>Candara</family>
                        <family>Corbel</family>
                        <family>Microsoft YaHei</family>
                        <family>微软雅黑</family>
                        <family>Microsoft JhengHei</family>
                        <family>微軟正黑體</family>
                        <family>Meiryo</family>
                        <family>Malgun Gothic</family>
                        <family>NSimSunNew</family>
                        <family>宋体New</family>
                        <family>PMingLiUNew</family>
                        <family>新細明體New</family>
                </prefer>
        </alias>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Cambria</family>	
                        <family>Constantia</family>		
                        <family>Microsoft YaHei</family>
                        <family>微软雅黑</family>
                        <family>Microsoft JhengHei</family>
                        <family>微軟正黑體</family>
                        <family>Meiryo</family>
                        <family>Malgun Gothic</family>
                        <family>NSimSunNew</family>
                        <family>宋体New</family>
                        <family>PMingLiUNew</family>
                        <family>新細明體New</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Consolas</family>
                        <family>Microsoft YaHei</family>
                        <family>微软雅黑</family>
                        <family>Microsoft JhengHei</family>
                        <family>微軟正黑體</family>
                        <family>Courier New</family>
                        <family>NSimSunNew</family>
                        <family>宋体New</family>
                        <family>PMingLiUNew</family>
                        <family>新細明體New</family>
                </prefer>
        </alias>

        <!--
        Load MS core fonts customization file
        -->
        <include ignore_missing="yes">./ms_vista_english.conf</include>

        <!--
        Load CJK Asian fonts customization file
        -->
        <include ignore_missing="yes">./ms_vista_cjk.conf</include>

        <!--
        Synthetic emboldening for fonts that do not have bold face available
        -->
        <match target="font" >
                <!-- check to see if the font is just regular -->
                <test name="weight" compare="less_eq">
                        <const>medium</const>
                </test>
                <!-- check to see if the pattern requests bold -->
                <test target="pattern" name="weight" compare="more">
                        <const>medium</const>
                </test>
                <!--
                set the embolden flag
                needed for applications using cairo, e.g. gucharmap, gedit, ...
                -->
                <edit name="embolden" mode="assign" >
                        <bool>true</bool>
                </edit>
                <!--
                set weight to bold
                needed for applications using Xft directly, e.g. Firefox, ...
                -->
                <edit name="weight" mode="assign">
                        <const>bold</const>
                </edit>
        </match>
</fontconfig>

 保存,最后重启X,完毕。贴几张图看看效果。

JavaEye在firefox下的效果:

 网易163在firefox下的效果:

  • 大小: 236.1 KB
  • 大小: 460.4 KB
分享到:
评论

相关推荐

    aui, Archlinux最终安装.zip

    aui, Archlinux最终安装 项目只接受补丁这个项目没有积极地开发,但是我们将接受 PRs Archlinux安装安装和配置archlinux从未更容易 !你可以先用 virtualbox 试试先决条件工作互联网连接以'root'登录'如何获取它

    Archlinux 新手安装指南

    ### Archlinux新手安装指南知识点详解 #### 一、Archlinux背景与设计理念 **Archlinux** 诞生于2001年初,其设计理念深受两个Linux发行版的影响:**PLD** 和 **CRUX**。 - **PLD** 使用了 **apt-get** 作为 **rpm...

    安装ArchLinux_ArchLinux.zip

    安装ArchLinux_ArchLinux

    ArchLinux安装指南_v1.0

    ### ArchLinux安装指南知识点梳理 #### 一、下载ArchLinux安装镜像并制作U盘启动工具 - **步骤1:** 下载ArchLinux最新版本的ISO镜像文件。 - **下载地址:** [https://www.archlinux.org/download/]...

    archlinux-安装完全指南.pdf

    - 根据个人需求安装额外的软件库、字体、图标主题等。 ### 七、总结 通过以上步骤,我们可以利用 larch 工具轻松地创建出一个高度个性化的 Arch Linux LiveUSB。这样的 LiveUSB 不仅包含了基本的操作系统功能,还...

    Archlinux的安装与配置

    这将会在 `/mnt` 目录下安装基础系统。 ##### 5. 配置系统 接下来,你需要进行一些基本的系统配置,如设置时区、主机名、root 密码等。这些步骤通常包括: - 使用 `ln -sf /usr/share/zoneinfo/Asia/Shanghai /...

    Archlinux/Manjaro安装blackarch全套

    因为网上安装和美化教程很多,在此不在重复,博主用的KDE Plasma桌面。 安装注意事项 1、有滚挂风险,博主已经提前备份好了系统盘(系统没挂) 2、确保系统有70G以上空间,全套工具很大 3、如果网速较差,可能会有某些...

    archlinux安装gnome注意事项

    在ArchLinux环境下安装GNOME3涉及到以下几个关键步骤: - **基本包组**: 包含了构建基础桌面环境所需的软件,可通过`# pacman -S gnome`命令安装。 - **额外软件包**: `gnome-extra`包含了更多额外的应用程序,可以...

    archlinux安装图解教程.pdf

    本教程使用的镜像版本为 archlinux-2010.05-core-i686.iso。 2. 刻录镜像 使用刻录软件将下载的镜像刻录到 CD 中,然后使用 CD 启动计算机。 3. LiveCD 启动 使用 CD 启动计算机,选择第一项 Boot Arch Linux ...

    虚拟机安装Archlinux(全.docx

    虚拟机安装 Archlinux 本教程旨在指导读者在虚拟机中安装 Archlinux 操作系统,并提供了相关的知识点和实践经验。 一、为什么选择 Linux 在介绍 Archlinux 安装之前,让我们首先了解为什么选择 Linux 作为操作...

    archlinux下emacs中文乱码问题的解决及中文输入模块的添加.docx

    在解决 ArchLinux 下 Emacs 中文乱码问题和添加中文输入模块的过程中,可能会遇到一些其他问题,例如 Ubuntu 下 Emacs 不能用法输入法的解决方法、Ubuntu 安装 Arduino 及用法 Emacs 开发、Ubuntu Server 设置 Emacs...

    archlinux安装笔记.pdf

    archlinux安装笔记.pdf

    Arch_Linux安装使用教程_每日实时更新!__包含ArchLinux从安装到日常使用、

    Arch_Linux安装使用教程_每日实时更新!__包含ArchLinux从安装到日常使用、娱乐_ArchLinuxTutorial

Global site tag (gtag.js) - Google Analytics