Microsoft fonts: Difference between revisions
m (→Windows 8: rm section since it's redundant with the content above it) |
(→Disable embedded bitmap fonts: don't duplicate Font configuration#Disable bitmap fonts) |
||
(21 intermediate revisions by 9 users not shown) | |||
Line 4: | Line 4: | ||
[[ru:Microsoft fonts]] | [[ru:Microsoft fonts]] | ||
[[zh-hans:Microsoft fonts]] | [[zh-hans:Microsoft fonts]] | ||
{{Style|Could be converted to use [[Template:App]].}} | |||
{{Related articles start}} | {{Related articles start}} | ||
{{Related|Metric-compatible fonts}} | {{Related|Metric-compatible fonts}} | ||
Line 18: | Line 20: | ||
=== Automatic Installation === | === Automatic Installation === | ||
{{Note|These automatically | {{Note|These automatically fetch the Windows Enterprise 90-day evaluation edition and extracts the required fonts from it.}} | ||
The easiest way to install the fonts is by installing one of the following: | The easiest way to install the fonts is by installing one of the following: | ||
* {{AUR|ttf-ms-win10-auto}} — Windows 10 fonts | * {{AUR|ttf-ms-win10-auto}} — Windows 10 fonts | ||
Line 25: | Line 27: | ||
=== Using fonts from a Windows partition === | === Using fonts from a Windows partition === | ||
If there is a Windows partition mounted, its fonts can be used by linking to them. It may be necessary to apply a workaround for [[NTFS-3G# | If there is a Windows partition mounted, its fonts can be used by linking to them. It may be necessary to apply a workaround for [[NTFS-3G#Unsupported reparse point|system compressed files]] in order to read the font files. | ||
{{Note|Users of {{AUR|google-chrome}} should opt to copy as symlinked fonts cause Chrome to crash.}} | {{Note|Users of {{AUR|google-chrome}} should opt to copy as symlinked fonts cause Chrome to crash.}} | ||
For example, if the Windows {{ic|C:\}} partition is mounted at {{ic|/windows}}: | For example, if the Windows {{ic|C:\}} partition is mounted at {{ic|/windows}}: | ||
# ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts | # ln -s /windows/Windows/Fonts /usr/local/share/fonts/WindowsFonts | ||
Then regenerate the fontconfig cache: | Then regenerate the fontconfig cache: | ||
Line 36: | Line 38: | ||
# fc-cache --force | # fc-cache --force | ||
Alternatively, copy the Windows fonts to {{ic|/usr/share/fonts/}}: | Alternatively, copy the Windows fonts to {{ic|/usr/local/share/fonts/}}: | ||
# mkdir /usr/share/fonts/WindowsFonts | # mkdir /usr/local/share/fonts | ||
# cp /windows/Windows/Fonts/* /usr/share/fonts/WindowsFonts/ | # mkdir /usr/local/share/fonts/WindowsFonts | ||
# chmod 644 /usr/share/fonts/WindowsFonts/* | # cp /windows/Windows/Fonts/* /usr/local/share/fonts/WindowsFonts/ | ||
# chmod 644 /usr/local/share/fonts/WindowsFonts/* | |||
Then regenerate the fontconfig cache: | Then regenerate the fontconfig cache: | ||
# fc-cache --force | # fc-cache --force | ||
# fc-cache-32 --force | |||
=== Extracting fonts from a Windows ISO === | === Extracting fonts from a Windows ISO === | ||
Line 50: | Line 54: | ||
The fonts can also be found in a Windows ISO file. The format of the image file containing the fonts in the ISO is either WIM (''Windows Imaging Format'') if the ISO is downloaded online or ESD (''Windows Electronic Software Download'') if it is built with Windows' ''Media Creation Tool''. Extract the {{ic|sources/install.esd}} or the {{ic|sources/install.wim}} file from the ''.iso'' and look for a {{ic|Windows/Fonts}} directory within this file. It can be extracted using ''7z'' (in [[p7zip]]) or ''wimextract'' (in {{pkg|wimlib}}). See an example below using ''7z'': | The fonts can also be found in a Windows ISO file. The format of the image file containing the fonts in the ISO is either WIM (''Windows Imaging Format'') if the ISO is downloaded online or ESD (''Windows Electronic Software Download'') if it is built with Windows' ''Media Creation Tool''. Extract the {{ic|sources/install.esd}} or the {{ic|sources/install.wim}} file from the ''.iso'' and look for a {{ic|Windows/Fonts}} directory within this file. It can be extracted using ''7z'' (in [[p7zip]]) or ''wimextract'' (in {{pkg|wimlib}}). See an example below using ''7z'': | ||
$ 7z e '' | $ 7z e ''WinXY_YYMM_English_x64.iso'' sources/install.wim | ||
$ 7z e install.wim 1/Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/ | $ 7z e install.wim 1/Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/ | ||
The fonts and the license will be located in the {{ic|fonts}} directory. | The fonts and the license will be located in the {{ic|fonts}} directory. | ||
Line 58: | Line 61: | ||
=== Current packages === | === Current packages === | ||
{{Note|These packages do '''require access to a Windows | {{Note|These packages do '''require''' access to a Windows and/or Office 2007 setup or installation media. Consult the corresponding [[PKGBUILD]]s for details.}} | ||
* {{AUR|ttf-office-2007-fonts}} — Office 2007 fonts | * {{AUR|ttf-office-2007-fonts}} — Office 2007 fonts | ||
Line 82: | Line 85: | ||
* [[Wikipedia:Lucida Console|Lucida Console]] | * [[Wikipedia:Lucida Console|Lucida Console]] | ||
* [[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] | * [[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] | ||
* [[Wikipedia:Times New Roman|Times New Roman]] | * [[Wikipedia:Times New Roman|Times New Roman]] | ||
* [[Wikipedia:Trebuchet MS|Trebuchet]] | * [[Wikipedia:Trebuchet MS|Trebuchet]] | ||
* [[Wikipedia:Verdana|Verdana]] | * [[Wikipedia:Verdana|Verdana]] | ||
* [[Wikipedia:Webdings|Webdings]] | * [[Wikipedia:Webdings|Webdings]] | ||
{{Warning|According to [https://web.archive.org/web/20020227054122/www.microsoft.com/typography/fontpack/eula.htm original Microsoft's End User License Agreement], there are ''some'' legal limitations when using the above fonts.}} | {{Warning|According to [https://web.archive.org/web/20020227054122/www.microsoft.com/typography/fontpack/eula.htm original Microsoft's End User License Agreement], there are ''some'' legal limitations when using the above fonts.}} | ||
Line 103: | Line 104: | ||
== Fontconfig rules useful for MS Fonts == | == Fontconfig rules useful for MS Fonts == | ||
=== Rule mapping for similar fonts === | |||
Often websites specify the fonts using generic names (helvetica, courier, times or times new roman) and a rule in fontconfig maps these names to free fonts (Liberation, Google CrOS, GUST TeX Gyre...). The substitutions are defined in {{ic|/etc/fonts/conf.d/30-metric-aliases.conf}}. | Often websites specify the fonts using generic names (helvetica, courier, times or times new roman) and a rule in fontconfig maps these names to free fonts (Liberation, Google CrOS, GUST TeX Gyre...). The substitutions are defined in {{ic|/etc/fonts/conf.d/30-metric-aliases.conf}}. | ||
Line 134: | Line 137: | ||
It is also useful to associate serif,sans-serif,monospace fonts in your favourite browser to MS fonts. | It is also useful to associate serif,sans-serif,monospace fonts in your favourite browser to MS fonts. | ||
=== Disable embedded bitmap fonts === | |||
Some Microsoft TTF fonts such as Calibri and Cambria contain embedded bitmap fonts for specific font sizes, which are not anti-aliased. If embedded bitmaps are enabled, the fonts are not anti-aliased at those specific sizes. Embedded bitmap fonts can be [[Font configuration#Disable bitmap fonts|disabled in the font configuration]]. | |||
== Known issues == | == Known issues == | ||
Line 139: | Line 146: | ||
=== Symbols not displaying properly with Poppler-based PDF readers === | === Symbols not displaying properly with Poppler-based PDF readers === | ||
The TrueType Microsoft font | The TrueType Microsoft font for Symbol ([[Wikipedia:Symbol (typeface)]]) are buggy with Poppler, math symbols may not display correctly in Poppler-based PDF readers. |
Latest revision as of 07:51, 13 March 2024
This article explains how to install TrueType Microsoft fonts and emulate Windows' font rendering.
Installation
Automatic Installation
The easiest way to install the fonts is by installing one of the following:
- ttf-ms-win10-autoAUR — Windows 10 fonts
- ttf-ms-win11-autoAUR — Windows 11 fonts
Using fonts from a Windows partition
If there is a Windows partition mounted, its fonts can be used by linking to them. It may be necessary to apply a workaround for system compressed files in order to read the font files.
For example, if the Windows C:\
partition is mounted at /windows
:
# ln -s /windows/Windows/Fonts /usr/local/share/fonts/WindowsFonts
Then regenerate the fontconfig cache:
# fc-cache --force
Alternatively, copy the Windows fonts to /usr/local/share/fonts/
:
# mkdir /usr/local/share/fonts # mkdir /usr/local/share/fonts/WindowsFonts # cp /windows/Windows/Fonts/* /usr/local/share/fonts/WindowsFonts/ # chmod 644 /usr/local/share/fonts/WindowsFonts/*
Then regenerate the fontconfig cache:
# fc-cache --force # fc-cache-32 --force
Extracting fonts from a Windows ISO
The fonts can also be found in a Windows ISO file. The format of the image file containing the fonts in the ISO is either WIM (Windows Imaging Format) if the ISO is downloaded online or ESD (Windows Electronic Software Download) if it is built with Windows' Media Creation Tool. Extract the sources/install.esd
or the sources/install.wim
file from the .iso and look for a Windows/Fonts
directory within this file. It can be extracted using 7z (in p7zip) or wimextract (in wimlib). See an example below using 7z:
$ 7z e WinXY_YYMM_English_x64.iso sources/install.wim $ 7z e install.wim 1/Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/
The fonts and the license will be located in the fonts
directory.
Current packages
- ttf-office-2007-fontsAUR — Office 2007 fonts
- ttf-win7-fontsAUR — Windows 7 fonts
- ttf-ms-win8AUR — Windows 8.1 fonts
- ttf-ms-win10AUR — Windows 10 fonts
- ttf-ms-win11AUR — Windows 11 fonts
Legacy packages
ttf-ms-fontsAUR includes:
- Andalé Mono
- Arial
- Arial Black
- Comic Sans
- Courier New
- Georgia
- Impact
- Lucida Sans
- Lucida Console
- Microsoft Sans Serif
- Times New Roman
- Trebuchet
- Verdana
- Webdings
You can also obtain ttf-tahomaAUR which, as you might expect, contains Tahoma.
ttf-vista-fontsAUR includes:
Fontconfig rules useful for MS Fonts
Rule mapping for similar fonts
Often websites specify the fonts using generic names (helvetica, courier, times or times new roman) and a rule in fontconfig maps these names to free fonts (Liberation, Google CrOS, GUST TeX Gyre...). The substitutions are defined in /etc/fonts/conf.d/30-metric-aliases.conf
.
To make full use of the Ms Windows fonts it is necessary to create a rule mapping those generic names to the Ms Windows specific fonts contained in the various packages above:
<?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>
It is also useful to associate serif,sans-serif,monospace fonts in your favourite browser to MS fonts.
Disable embedded bitmap fonts
Some Microsoft TTF fonts such as Calibri and Cambria contain embedded bitmap fonts for specific font sizes, which are not anti-aliased. If embedded bitmaps are enabled, the fonts are not anti-aliased at those specific sizes. Embedded bitmap fonts can be disabled in the font configuration.
Known issues
Symbols not displaying properly with Poppler-based PDF readers
The TrueType Microsoft font for Symbol (Wikipedia:Symbol (typeface)) are buggy with Poppler, math symbols may not display correctly in Poppler-based PDF readers.