Microsoft fonts (简体中文)

From ArchWiki
Jump to: navigation, search
翻译状态: 本文是英文页面 MS_Fonts翻译,最后翻译时间:2017-10-18,点击这里可以查看翻译后英文页面的改动。

本文介绍如何安装微软 TrueType 字体并模拟 Windows 渲染设置。

安装

从Windows使用字体

如果有一个安装了Windows的分区, 可以通过链接它们来使用其字体。

例如, Windows的C:\盘被挂载在/windows:

# ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts

然后重新生成字体缓存:

# fc-cache -f

或者,将Windows的字体复制到/usr/share/fonts:

# mkdir /usr/share/fonts/WindowsFonts
# cp /windows/Windows/Fonts/* /usr/share/fonts/WindowsFonts
# chmod 755 /usr/share/fonts/WindowsFonts/*

然后重新生成字体缓存:

# fc-cache -f 

当前软件包

Note: 这些包需要访问 Windows 7 和/或 Office 2007 的安装程序或安装媒体。

旧程序包

Note: 由这些包提供的字体已过期和缺少现代提示的指令和全字符集。建议使用上面所述软件包。

ttf-ms-fontsAUR 包含:

根据微软的最终用户许可协议,有“一些”法律限制时使用的字体。

ttf-tahomaAUR包含 Tahoma

ttf-vista-fontsAUR是一个AUR包,它包括:

微软字体适用的 Fontconfig 规则

网站通常使用字体的通用名称(helvetica, courier, times 或 times new roman),fontconfig 的一个规则文件将其替换为不太美观的免费字体:

/etc/fonts/conf.d/30-metric-aliases-free.conf

要使用微软字体,需要将通用名称映射到微软的字体:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
       <alias binding="same">
         <family>Helvetica</family>
         <accept>
         <family>Arial</family>
         </accept>
       </alias>
       <alias binding="same">
         <family>Times</family>
         <accept>
         <family>Times New Roman</family>
         </accept>
       </alias>
       <alias binding="same">
         <family>Courier</family>
         <accept>
         <family>Courier New</family>
         </accept>
       </alias>
</fontconfig>

建议在浏览器中,将 serif,sans-serif,monospace 字体也映射到 MS 字体。

Windows 8

The ttf-ms-win8AUR split package is intended as a more up-to-date replacement for ttf-ms-fontsAUR, ttf-vista-fontsAUR and ttf-win7-fontsAUR.

Although it provides newer versions of the fonts, it cannot automatically download the fonts due to license issues .

Note: usage of Microsoft fonts outside running Windows system is prohibited by EULA (although in certain countries EULA is invalid). Please consult Microsoft license before using fonts.

You can acquire fonts from an installed and fully updated Windows 8.1 system. Any edition of Windows 8.1 build Windows 8.1 6.3.9600.17238 will work.

On the installed Windows 8.1 system fonts are usually located in %WINDIR%\Fonts and license file is %SYSTEM32%\license.rtf.

You need the files listed in the source=() array. Place them in the same directory as this PKGBUILD file, then run makepkg.

makepkg --pkg ttf-ms-win8 will make just the Windows 8.1 core fonts package which should cover even more than ttf-ms-fontsAUR.