1.下载后将字体放到 /usr/share/fonts/vista/(怎么下载字体和怎么放到vista目录中不用我教了吧)
2.建立字体缓存信息
代码:
sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fv
3.将附件解压并拷贝配置文件到 /etc/fonts/ 下
4.覆盖local.conf文件
代码:
cd /etc/fonts/conf.avail
sudo cp ../local.conf 51-local.conf #覆盖51-local.conf
5.修改配置文件
代码:
cd /etc/fonts/conf.avail
sudo gedit 69-language-selector-zh-cn.conf
分别在
<string>Bitstream Vera Serif</string>
<string>Bitstream Vera Sans</string>
<string>Bitstream Vera Sans Mono</string>
下添加
代码:
<string>Microsoft YaHei</string>
<string>Segoe UI</string>
6.重启X(ctrl+alt+backspace)
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>
ms_vista_cjk.conf
引用:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/ms_vista_cjk.conf file to configure Vista CJK font access -->
<fontconfig>
<!--
The dual-width Asian fonts (spacing=dual) are not rendered correctly,
apparently FreeType forces all widths to match. Trying to disable the
width forcing code by setting globaladvance=false alone doesn't help.
As a brute force workaround, also set spacing=proportional, i.e. handle
them as proportional fonts:
-->
<match target="font" >
<test target="pattern" name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="spacing" compare="eq" >
<const>dual</const>
</test>
<edit name="spacing" mode="assign" >
<const>proportional</const>
</edit>
<edit name="globaladvance" mode="assign" >
<bool>false</bool>
</edit>
</match>
<!--
There is a similar problem with dual width bitmap fonts. They don't
have spacing=dual, therefore they are not handled by the above rule
and still display as charcell fonts. For example "Efont Biwidth"
has spacing=mono and "Misc Fixed Wide" has spacing=charcell.
Force handling of these fonts as proportional fonts as well:
-->
<match target="font">
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="outline" compare="eq" >
<bool>false</bool>
</test>
<test name="spacing" compare="eq" >
<const>mono</const>
<const>charcell</const>
</test>
<edit name="spacing">
<const>proportional</const>
</edit>
<edit name="globaladvance" binding="strong" >
<bool>false</bool>
</edit>
</match>
<!--
Vista CJK fonts setting
-->
<!--
Vista new Simplified Chinese font
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>Microsoft YaHei</string>
<string>微软雅黑</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Vista new Traditional Chinese font
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>Microsoft JhengHei</string>
<string>微軟正黑體</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Vista new Japanese font
-->
<match target="font" >
<test name="family" compare="eq" >
<string>Meiryo</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Vista new Korean font
-->
<match target="font" >
<test name="family" compare="eq" >
<string>Malgun Gothic</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Terminal font setting
In my opinion, Courier New + simsun/pmingliu is still an ideal combination
-->
<alias>
<family>Courier New</family>
<accept>
<family>SimSunNew</family>
<family>PMingLiUNew</family>
</accept>
</alias>
<!--
Courier New setting
-->
<!--
Courier New Regular
-->
<match target="font" >
<test name="family" >
<string>Courier New</string>
</test>
<test name="weight" compare="eq">
<const>regular</const>
</test>
<test name="slant" compare="eq" >
<const>roman</const>
</test>
<test name="size" compare="more_eq" >
<double>7</double>
</test>
<test name="size" compare="less_eq" >
<double>27</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Courier New Bold
-->
<match target="font" >
<test name="family" >
<string>Courier New</string>
</test>
<test name="weight" compare="eq">
<const>bold</const>
</test>
<test name="slant" compare="eq" >
<const>roman</const>
</test>
<test name="size" compare="more_eq" >
<double>7</double>
</test>
<test name="size" compare="less_eq" >
<double>11</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Courier New Italic
-->
<match target="font" >
<test name="family" >
<string>Courier New</string>
</test>
<test name="weight" compare="eq">
<const>regular</const>
</test>
<test name="slant" compare="eq" >
<const>italic</const>
</test>
<test name="size" compare="more_eq" >
<double>7</double>
</test>
<test name="size" compare="less_eq" >
<double>27</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Courier New Bold Italic
-->
<match target="font" >
<test name="family" >
<string>Courier New</string>
</test>
<test name="weight" compare="eq">
<const>bold</const>
</test>
<test name="slant" compare="eq" >
<const>italic</const>
</test>
<test name="size" compare="more_eq" >
<double>7</double>
</test>
<test name="size" compare="less_eq" >
<double>12</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
SimSunNew global setting.
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>SimSunNew</string>
<string>宋体New</string>
</test>
<edit name="rgba" mode="assign" >
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
PMingLiUNew global setting.
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>PMingLiUNew</string>
<string>新細明體New</string>
</test>
<edit name="rgba" mode="assign" >
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Enable chinese embedded bitmap fonts.
-->
<!--
SimSunNew embedded bitmap fonts, ppem = 12px, 13px, 14px, 15px, 16px, 18px.
choose as your need
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>SimSunNew</string>
<string>宋体New</string>
</test>
<test name="pixelsize" compare="more" >
<double>11.5</double>
</test>
<test name="pixelsize" compare="less" >
<double>18.5</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
</match>
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>SimSunNew</string>
<string>宋体New</string>
</test>
<test name="pixelsize" compare="more" >
<double>16.5</double>
</test>
<test name="pixelsize" compare="less" >
<double>17.5</double>
</test>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
</match>
<!--
PMingLiUNew embeded bitmap fonts, ppem = 11px, 12px, 13px, 15px, 16px, 20px
choose as your need
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>PMingLiUNew</string>
<string>新細明體New</string>
</test>
<test name="pixelsize" compare="more" >
<double>10.5</double>
</test>
<test name="pixelsize" compare="less" >
<double>16.5</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
</match>
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>PMingLiUNew</string>
<string>新細明體New</string>
</test>
<test name="pixelsize" compare="more" >
<double>13.5</double>
</test>
<test name="pixelsize" compare="less" >
<double>14.5</double>
</test>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>PMingLiUNew</string>
<string>新細明體New</string>
</test>
<test name="pixelsize" compare="more" >
<double>19.5</double>
</test>
<test name="pixelsize" compare="less" >
<double>20.5</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
</match>
</fontconfig>
ms_vista_english.conf
引用:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/ms_vista_english.conf file to configure Vista english font access -->
<fontconfig>
<!--
Alias three well known Adobe font names to MS Vista fonts.
These substitute TrueType faces for similar Type1 faces to improve
screen appearance.
-->
<alias>
<family>Helvetica</family>
<prefer>
<family>Segoe UI</family>
</prefer>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Times</family>
<prefer>
<family>Cambria</family>
</prefer>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>Courier</family>
<prefer>
<family>Consolas</family>
</prefer>
<default>
<family>monospace</family>
</default>
</alias>
<!--
Do the same trick to three well known web font names.
They are MS core fonts.
-->
<alias>
<family>Arial</family>
<prefer>
<family>Segoe UI</family>
</prefer>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Times New Roman</family>
<prefer>
<family>Cambria</family>
</prefer>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>Courier New</family>
<prefer>
<family>Consolas</family>
</prefer>
<default>
<family>monospace</family>
</default>
</alias>
<!--
Vista new english fonts
-->
<!--
Sans-Serif
-->
<match target="font" >
<test name="family" compare="eq" >
<string>Segoe UI</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<test name="family" compare="eq" >
<string>Calibri</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<test name="family" compare="eq" >
<string>Candara</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<test name="family" compare="eq" >
<string>Corbel</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Serif
-->
<match target="font" >
<test name="family" compare="eq" >
<string>Cambria</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>Constantia</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
<!--
Monospace
-->
<match target="font" >
<test qual="any" name="family" compare="eq" >
<string>Consolas</string>
</test>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintslight</const>
</edit>
</match>
</fontconfig>