Installing Microsoft fonts on Fedora can be useful for users who require these fonts for compatibility with documents or web pages that rely on them. The msttcore-fonts-installer package is a convenient way to install the core Microsoft TrueType fonts, such as Arial, Times New Roman, and Verdana, on your Fedora system. These fonts are widely used in many documents and websites, making their installation essential for a seamless experience.
To install Microsoft fonts on Fedora 40 or 39, you can use the msttcore-fonts-installer package via the command-line terminal. This guide will walk you through the installation process, ensuring you have the necessary fonts available on your system.
Update Fedora before Microsoft Fonts Installation
To minimize the risk of installation issues, start by updating your Fedora system. Open your terminal and execute the command below to refresh and upgrade your system packages:
sudo dnf upgrade --refresh
Install Microsoft Fonts via msttcore-fonts-installer
Before installing Microsoft Fonts, you must ensure the necessary tools are on your system. These tools include curl for downloading files, cabextract for extracting Microsoft font files, and fontconfig for managing and customizing font access. Most Fedora installations will have these by default, but it’s good practice to check and install any missing ones.
Use this command to install them:
sudo dnf install curl cabextract xorg-x11-font-utils fontconfig
Once the prerequisites are in place, proceed to download and install the Microsoft Core Fonts package using the following command:
sudo rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
Confirm Microsoft Fonts Installation in Terminal
After running the installation command, Fedora should display a confirmation message. This message signifies that your system has successfully installed the Microsoft Fonts package.
Verify Microsoft Fonts via Fonts Application
Accessing the Font Viewer
After installing Microsoft Fonts, they should be integrated into your Fedora system and readily accessible across various applications. To verify their presence, navigate to the Font Viewer:
- Click on “Activities” at the top left corner of your screen.
- Select “Show Applications” at the bottom of the sidebar.
- Type “Fonts” in the search bar or find the Fonts application icon and open it.
Confirming Font Installation
You can confirm the installation of specific Microsoft Fonts within the Font Viewer by searching for them. In the search bar, type the names of widely recognized fonts such as Arial, Calibri, and Times New Roman.
Checking Arial Font
Type “Arial” in the search bar of the Font Viewer to check if the Arial font is available.
Checking Calibri Font
Similarly, search for “Calibri” to confirm the installation of the Calibri font.
Checking Times New Roman Font
Lastly, verify the Times New Roman font by searching for it within the application.
Additional Commands with Microsoft Fonts
Remove Microsoft Fonts
The process is straightforward if you need to uninstall Microsoft Fonts from your Fedora system, perhaps for troubleshooting or system cleanup. Execute the following command in the terminal:
sudo dnf remove msttcore-fonts-installer
This command initiates the removal of the msttcore-fonts-installer package, which is responsible for the presence of Microsoft Fonts on your Fedora system. Once the command is executed, the package and associated Microsoft Fonts will be uninstalled.
Conclusion
With the Microsoft fonts installed on your Fedora system, you can ensure better compatibility with a wide range of documents and websites that rely on these fonts. While updates for these fonts are rare unless Microsoft releases new versions, it’s a good idea to occasionally check for any changes. Enjoy the improved readability and presentation of documents and web pages on your Fedora setup.
В данном HOWTO мы подробно рассмотрим как установить в систему шрифты Microsoft Core Fonts (msttcorefonts) на базе дистрибутива Fedora (для других дистрибутивов будет лишь отличаться команда установки пакетов в систему).
Введение
Данные шрифты часто требуются при работе с документами, сохранёнными в MS Office, либо OpenOffice (LibreOffice) под ОС Windows, а также на большинстве веб-сайтов.
Внимание! Данные шрифты не являются свободными и защищены патентами, поэтому используйте на свой страх и риск.
Подготовка к установке
До начала сборки и установки пакетов со шрифтами нам необходимо установить инструменты сборки RPM пакетов, а также ряд их зависимостей:
sudo dnf install rpmdevtools cabextract ttmkfdir
Разрешим это действие и если потребуется введём пароль пользователя.
Сборка из исходников
Для начала создадим базовую иерархию каталогов rpmbuild:
rpmdev-setuptree
Загрузим SPEC файл с официального сайта проекта:
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec -O ~/rpmbuild/SPECS/msttcorefonts-2.5-1.spec
Теперь запустим сборку для нашей платформы:
rpmbuild -ba ~/rpmbuild/SPECS/msttcorefonts-2.5-1.spec
Через некоторое время пакет с набором шрифтов будет собран, а результат размещён в каталоге ~/rpmbuild/RPMS/noarch/ (для msttcorefonts).
Внимание! Часть указанных в SPEC файле зеркал в уже прекратили своё существование, поэтому с первого раза сборка пакета может не завершиться. В таком случае необходимо запускать её повторно до тех пор, пока все необходимые файлы шрифтов не будет загружены в каталог хранения исходников.
Установка собранного пакета
Установим собранный пакет в систему:
sudo dnf install ~/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
# This is the msttcorefonts spec file as distributed from
# http://corefonts.sourceforge.net/.
%define name msttcorefonts
# nowdays most (all?) distributions seems to use this. Oh the joys of the FHS
%define ttmkfdir /usr/bin/ttmkfdir
%define fontdir /usr/share/fonts/%{name}
Summary: TrueType core fonts for the web
Name: %{name}
Version: 2.5
Release: 1
License: Spec file is GPL, binary rpm is gratis but non-distributable
Group: User Interface/X
BuildArch: noarch
BuildRoot: /var/tmp/%{name}-root
BuildRequires: %{ttmkfdir}
BuildRequires: wget
BuildRequires: cabextract
Packager: Noa Resare <noa@resare.com>
%description
The TrueType core fonts for the web that was once available from
http://www.microsoft.com/typography/fontpack/. The src rpm is cleverly
constructed so that the actual fonts are downloaded from Sourceforge’s site
at build time. Therefore this package technically does not ‘redistribute’
the fonts, it just makes it easy to install them on a linux system.
%prep
mkdir -p %{name}/downloads
cd %{name}/downloads
# this is the sourceforge mirrorlist as of 2012-09-06. If someone spots changes
# over at sourceforge, feel free to email me and I’ll update the list
mirrors=«aarnet+cdnetworks-kr-1+citylan+dfn+freefr+garr+heanet+hivelocity+ignum+internode+iweb+jaist+nchc+netcologne+space+superb-dca2+superb-dca3+superb-sea2+switch+tenet+ufpr+voxel+waix»
mirror_count=23
andale32_md5=«cbdc2fdd7d2ed0832795e86a8b9ee19a andale32.exe»
arial32_md5=«9637df0e91703179f0723ec095a36cb5 arial32.exe»
arialb32_md5=«c9089ae0c3b3d0d8c4b0a95979bb9ff0 arialb32.exe»
comic32_md5=«2b30de40bb5e803a0452c7715fc835d1 comic32.exe»
courie32_md5=«4e412c772294403ab62fb2d247d85c60 courie32.exe»
georgi32_md5=«4d90016026e2da447593b41a8d8fa8bd georgi32.exe»
impact32_md5=«7907c7dd6684e9bade91cff82683d9d7 impact32.exe»
times32_md5=«ed39c8ef91b9fb80f76f702568291bd5 times32.exe»
trebuc32_md5=«0d7ea16cac6261f8513a061fbfcdb2b5 trebuc32.exe»
webdin32_md5=«230a1d13a365b22815f502eb24d9149b webdin32.exe»
verdan32_md5=«12d2a75f8156e10607be1eaa8e8ef120 verdan32.exe»
download_files=«andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe georgi32.exe impact32.exe times32.exe trebuc32.exe webdin32.exe verdan32.exe»
failures=0
function set_mirror {
local r m
r=`expr $RANDOM % $mirror_count + 1`
m=`echo $mirrors |cut -d+ -f$r`
#mirror=»http://${m}.dl.sourceforge.net/project/corefonts/the%20fonts/final/»
mirror=«https://sourceforge.net/projects/mscorefonts/files/MS%20Core%20Fonts/win/»
}
function check_file {
matches=
if [ ! -r $1 ]
then
echo «$1 does not exist»
return
fi
local variable_name=`basename $1 .exe`_md5
local stored_checksum
eval stored_checksum=\$$variable_name
local computed_checksum=`md5sum $1`
if [ «$stored_checksum» = «$computed_checksum» ]
then
matches=yes
else
rm $1
matches=
fi
}
function download {
wget —timeout=5 -O «$2» $1$2
}
set_mirror
for f in $download_files
do
check_file $f
while [ ! $matches ]
do
download $mirror $f
check_file $f
if [ ! $matches ]
then
echo «failed to download $mirror$f»
failures=`expr $failures + 1`
if [ $failures -gt 5 ]
then
echo «failed to download too many times.»
exit
fi
set_mirror
fi
done
done
%build
font_files=«andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe georgi32.exe impact32.exe times32.exe trebuc32.exe webdin32.exe verdan32.exe»
cd %{name}
rm -rf cab-contents fonts
mkdir cab-contents
mkdir fonts
for i in $font_files
do
if [ -f downloads/$i ]
then
cabextract —lowercase —directory=cab-contents downloads/$i
fi
cp cab-contents/*.ttf fonts
rm -f cab-contents/*
done
cd fonts
%{ttmkfdir} > fonts.dir
%install
[ «$RPM_BUILD_ROOT« != «/« ] && rm -rf $RPM_BUILD_ROOT
cd %{name}/fonts
mkdir -p $RPM_BUILD_ROOT/%{fontdir}
cp *.ttf fonts.dir $RPM_BUILD_ROOT/%{fontdir}
%clean
[ «$RPM_BUILD_ROOT« != «/« ] && rm -rf $RPM_BUILD_ROOT
%post
if [ -x /usr/sbin/chkfontpath -a $1 -eq 1 ]; then
/usr/sbin/chkfontpath —add %{fontdir}
fi
# something has probably changed, update the font-config cache
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache
fi
%preun
if [ -x /usr/sbin/chkfontpath -a $1 -eq 0 ]; then
/usr/sbin/chkfontpath —remove %{fontdir}
fi
%files
%attr(-,root,root) %{fontdir}
%dir %{fontdir}
%changelog
* Sun Sep 09 2012 Noa Resare <noa@resare.com> 2.5-1
— Various updates from Deven T. Corzine, mirrors etc
* Sun May 07 2006 Noa Resare <noa@resare.com> 2.0-1
— checksums downloads
— random mirror
— use redistributable word 97 viewer as source for tahoma.ttf
* Mon Mar 31 2003 Daniel Resare <noa@resare.com> 1.3-4
— updated microsoft link
— updated sourceforge mirrors
* Mon Nov 25 2002 Daniel Resare <noa@resare.com> 1.3-3
— the install dir is now deleted when the package is uninstalled
— executable permission removed from the fonts
— executes fc-cache after install if it is available
* Thu Nov 07 2002 Daniel Resare <noa@resare.com> 1.3-2
— Microsoft released a new service-pack. New url for Tahoma font.
* Thu Oct 24 2002 Daniel Resare <noa@resare.com> 1.3-1
— removed python hack
— removed python hack info from description
— made tahoma inclusion depend on define
— added some info on the ttmkfdir define
* Tue Aug 27 2002 Daniel Resare <noa@resare.com> 1.2-3
— fixed spec error when tahoma is not included
* Tue Aug 27 2002 Daniel Resare <noa@resare.com> 1.2-2
— removed tahoma due to unclear licensing
— parametrized ttmkfdir path (for mandrake users)
— changed description text to reflect the new microsoft policy
* Thu Aug 15 2002 Daniel Resare <noa@resare.com> 1.2-1
— changed distserver because microsoft no longer provides them
* Tue Apr 09 2002 Daniel Resare <noa@resare.com> 1.1-3
— fixed post/preun script to actually do what they were supposed to do
* Tue Mar 12 2002 Daniel Resare <noa@resare.com> 1.1-2
— removed cabextact from this package
— added tahoma font from ie5.5 update
* Fri Aug 25 2001 Daniel Resare <noa@metamatrix.se>
— initial version
Microsoft fonts are widely used across documents, presentations, and websites, and often you’ll come across files that rely on these fonts for consistent formatting.
On Linux, these fonts aren’t included by default due to licensing restrictions, but it’s possible to install them with a few straightforward steps.
In this guide, we’ll walk you through the process of installing Microsoft fonts on popular Linux distributions so that you can ensure compatibility with Microsoft Office documents and improve the visual consistency of websites and presentations.
Why Install Microsoft Fonts on Linux?
Linux distributions come with a variety of open-source fonts. However, Microsoft fonts like Arial, Times New Roman, and Verdana are essential in many scenarios:
- Document Compatibility: Many Microsoft Office documents use these fonts as defaults. Installing them ensures that Word and PowerPoint files display correctly.
- Web Browsing: Some websites rely on these fonts to display content as intended, making them useful for a more seamless browsing experience.
- Design and Presentation: If you’re working on design files or presentations that will be used across platforms, having Microsoft fonts available can ensure consistency.
Now, let’s look into the step-by-step process of installing these fonts.
Installing Microsoft Fonts on Debian and Debian-Based (Ubuntu, Linux Mint, etc.) Systems.
Ubuntu, Debian, and other Debian-based systems like Linux Mint offer Microsoft fonts in a package called ttf-mscorefonts-installer. Here’s how to install it.
Installation Steps:
Update Your Package List: Open a terminal and update your package list to make sure you have the latest version.
sudo apt update
Install ttf-mscorefonts-installer: Next, install the Microsoft fonts package.
sudo apt install ttf-mscorefonts-installer
Accept the EULA: During installation, you’ll be prompted to accept the End User License Agreement (EULA) for the fonts. Use the Tab and Enter keys to accept.
Refresh the Font Cache: To make the fonts available to applications, refresh the font cache with this command. It is optional if you don’t wish to reboot.
sudo fc-cache -f -v
After completing these steps, you should see fonts like Arial, Times New Roman, and Comic Sans available in applications like LibreOffice, GIMP, and other programs that allow font selection.
Installing Microsoft Fonts on Arch Linux and Manjaro.
For users of Arch Linux, Manjaro, and other Arch-based distributions, Microsoft fonts can be installed from the Arch User Repository (AUR) as the ttf-ms-fonts package. If you’re comfortable with AUR helpers, follow these steps.
Installation Steps:
Install an AUR Helper (if you haven’t already): AUR helpers like yay or paru make it easy to install packages from the AUR. If you don’t have one, install one by following the instructions on the AUR helper’s official page.
Install ttf-ms-fonts from the AUR: Use your AUR helper to install the fonts.
yay -S ttf-ms-fonts
Update the Font Cache: As with other distributions, update your font cache so the new fonts become available system-wide.
sudo fc-cache -f -v
Once you’re finished, you’ll find Microsoft fonts available across your system.
Installing Microsoft Fonts on Fedora-Based Systems.
Fedora users can install Microsoft fonts by enabling third-party repositories, as Fedora doesn’t include these fonts by default due to licensing. RPM Fusion, a trusted source for extra packages on Fedora, provides an easy way to install these fonts.
Installation Steps:
Enable the RPM Fusion Repository: First, enable the RPM Fusion repository to get access to additional packages.
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
Install mscore-fonts: With RPM Fusion enabled, you can now install the mscore-fonts package.
sudo dnf install mscore-fonts
Refresh the Font Cache: Refresh the font cache to make the fonts accessible across applications.
sudo fc-cache -f -v
Fedora users should now have Microsoft fonts installed and ready to use in LibreOffice, web browsers, and other applications.
Additional Method: Manual Installation for All Distributions.
If you prefer not to use a package manager or if your distribution doesn’t support the packages mentioned above, you can manually install Microsoft fonts.
Installation Steps:
Download the Fonts: You can find Microsoft’s TrueType fonts online. Download the .ttf files you need.
Copy Fonts to Your Fonts Directory: Place the downloaded .ttf files in your local font directory. For single-user access, use.
mkdir -p ~/.fonts
cp path_to_your_fonts/*.ttf ~/.fonts/
For system-wide access, copy the files to /usr/share/fonts (this requires root permissions).
sudo cp path_to_your_fonts/*.ttf /usr/share/fonts/
Update the Font Cache: Finally, refresh the font cache.
sudo fc-cache -f -v
This manual method allows you to add specific fonts on demand and is helpful if you need only certain Microsoft fonts without installing the full package.
Verifying Your Installation.
To confirm that the fonts have been installed correctly, open any application with font selection (such as LibreOffice, GIMP, or even your system’s font viewer). You should now see Microsoft fonts such as Arial, Times New Roman, and Comic Sans available for use.
Final Thoughts.
Installing Microsoft fonts on Linux is straightforward and opens up greater compatibility with documents, websites, and design projects that depend on these fonts. With these fonts now available on your system, you’ll experience fewer issues with document formatting and web browsing.
Whether you’re using Ubuntu, Fedora, Arch, or another Linux flavor, this guide has shown you how to get Microsoft fonts up and running with ease.
Let us know if you have any questions or tips for other Linux users, and enjoy the enhanced compatibility these fonts bring to your Linux experience!
В этом How To Посмотрим, как установить шрифты: Arial. Comic Sans, Новое время роман, среди прочего, легко, просто и благодаря следующему скрипту. Давайте начнем :).
Скачиваем скрипт со страницы автора:
wget "http://blog.andreas-haerter.com/_export/code/2011/07/01/install-msttcorefonts-fedora.sh?codeblock=1" -O "/tmp/install-msttcorefonts-fedora.sh"
Мы даем ему права на выполнение:
chmod a+rx "/tmp/install-msttcorefonts-fedora.sh"
Запускаем скрипт:
su -c "/tmp/install-msttcorefonts-fedora.sh"
В конце установки он попросит вас перезагрузить компьютер, я говорю вам, чтобы избежать катастроф XD. Если кто хочет добавить шрифты Windows Vista (манометры) воспользуйтесь следующим сообщением: Добавьте шрифты в ваш Linux (GoogleWebFonts, UbuntuFonts, VistaFonts)
источник: blog.andreas-haerter.com
