Microsoft fonts (简体中文)
本文介绍如何安装微软 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
当前软件包
- ttf-office-2007-fontsAUR - Microsoft Office 2007字体
- ttf-win7-fontsAUR - Windows 7字体
- ttf-ms-win8AUR - Windows 8.1 字体
- ttf-ms-win10AUR — Windows 10 字体
旧程序包
ttf-ms-fontsAUR 包含:
- Andalé Mono
- Arial
- Arial Black
- Comic Sans
- Courier New
- Georgia
- Impact
- Lucida Sans
- Lucida Console
- Microsoft Sans Serif
- Symbol
- Times New Roman
- Trebuchet
- Verdana
- Webdings
- Wingdings
根据微软的最终用户许可协议,有“一些”法律限制时使用的字体。
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 .
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.