如何在基于 Ubuntu 的发行版上安装微软 TrueType 字体
微软 字体
如果你在 Linux 上用 LibreOffice 打开一些微软文档，你会发现字体看起来有一点不同。你也将注意到有些常用字体找不到，如 [Times New Roman](https://en.wikipedia.org/wiki/Times_New_Roman)、Arial 等等。


不用担心。我将向你展示如何在 Ubuntu 上和其它基于 Ubuntu 的 Linux 发行版上安装这些字体。但是在此之前，让我告诉你为什么这些字体没有被默认安装。


### 为什么微软字体不被默认安装在 Linux 中？


![](/data/attachment/album/202004/05/100617f53zekt8833t5b3u.png)


Times New Roman、Arial 等字体都是微软的，并且这些字体不是开源的。很多 Linux 发行版默认不提供专有软件，以避免授权问题。


这就是为什么在默认情况下 Ubuntu 和其它 Linux 发行版使用开源字体 “Liberation” 字体来替代微软字体的原因。[Red Hat](https://en.wikipedia.org/wiki/Red_Hat) 创建 [Liberation 字体](https://en.wikipedia.org/wiki/Liberation_fonts) 来代替 Arial、Arial Narrow、 Times New Roman 和 Courier New，因为这些字体的宽度一样。当你打开一个使用 Times New Roman 字体书写的文档时，会使用对应的 Liberation 字体来保持文档不被破坏。


不过，Liberation 字体与微软的字体并不是完全相同的，在一些情况下，你可能需要使用 Arial 或 Times New Roman。一个非常常见的情况是，在学校、大学和其他公共或私人机构中，微软的字体是唯一的选择。他们要求你使用这些字体之一来提交文档。


好在，你可以在 Ubuntu 和其它发行版上很容易地安装微软字体。以这种方式，你将增强 LibreOffice 的兼容性，并可以自由选择开源办公软件。


### 在基于 Ubuntu 的 Linux 发行版上安装微软字体


你可以自行下载字体，并[在 Ubuntu 中安装新的字体](https://itsfoss.com/install-fonts-ubuntu/)。但是由于微软字体非常受欢迎（并且是免费提供的），所以 Ubuntu 提供了一种简单的方法来安装它们。


要知道尽管微软已经免费发布了其核心字体，在其它操作系统中使用该字体依然是受到限制的。在 Ubuntu 中安装微软字体前，你必须阅读并接受 EULA (最终用户许可协议) 。


这些字体 [可在 multiverse 存储库中获得，首先要确保启用它](https://itsfoss.com/ubuntu-repositories/)：



```
sudo add-apt-repository multiverse
```

在此之后，你可以更新你的 Ubuntu 存储库缓存，并像这样安装微软字体：



```
sudo apt update && sudo apt install ttf-mscorefonts-installer
```

当微软的最终用户协议出现时，按 `tab` 键来选择 “OK” ，并按回车键。


![](/data/attachment/album/202004/05/100739fm17hnnn75cf7znc.png)


单击 “Yes” 来接受微软的协议：


![](/data/attachment/album/202004/05/100755x1uz1al1l1v88w80.png)


当安装完成后，你应该使用下面的命令来更新字体缓存：



```
sudo fc-cache -f -v
```

![](/data/attachment/album/202004/05/100810vxmeea6phx6sp0wh.png)


如果你现在打开 LibreOffice ，你将看到微软 [TrueType 字体](https://en.wikipedia.org/wiki/TrueType) 。


![](/data/attachment/album/202004/05/100825o5z8ui1ub428fi8q.png)


如果意外地拒绝了许可协议，你可以使用这个命令来重新安装安装程序：



```
sudo apt install –reinstall ttf-mscorefonts-installer
```

微软的 TrueType 字体也可以通过 [Ubuntu Restricted Extras package](https://itsfoss.com/install-media-codecs-ubuntu/) 获得，其包含用来播放 MP3 等文件的其它专有的多媒体编解码器。



> 
> 不要轻视专有字体。
> 
> 
> 你可能认为字体有什么大不了的呢？毕竟，它只是一款字体，而不是软件的一个关键部分，对吧？但是你知道，这些年来 [Netflix 为其使用的专有字体支付了数百万美元](https://thehustle.co/nextflix-sans-custom-font/)吗？最后，他们创建了自己的自定义字体，这为他们节省了一大笔钱。
> 
> 
> 


希望这个快速教程有用。更多的生产力教程即将上线，请在下面留下你的评论，了解更多信息请订阅我们的社交媒体！




---


via: <https://itsfoss.com/install-microsoft-fonts-ubuntu/>


作者：[Dimitrios Savvopoulos](https://itsfoss.com/author/itsfoss/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[robsean](https://github.com/robsean) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

If you open some Microsoft documents in LibreOffice on Linux, you’ll notice that the fonts look a bit different. You’ll also notice that you cannot find common fonts like [Times New Roman](https://en.wikipedia.org/wiki/Times_New_Roman?ref=itsfoss.com), [Arial](https://en.wikipedia.org/wiki/Arial) etc.

Don’t worry. I’ll show you how to install these fonts in Ubuntu and other Ubuntu-based Linux distributions.

But before that, let me tell you why these fonts are not available by default.

![Install Microsoft TrueType Fonts on Ubuntu-based Distributions](https://itsfoss.com/content/images/2023/03/microsoft-fonts-ubuntu.webp)

## Why are Microsoft fonts not installed by default in Linux?

Times New Roman, Arial, and other such fonts are owned by Microsoft, and they are not open source. Many Linux distributions don’t provide proprietary software by default to avoid licensing issues. This is why Ubuntu and other Linux distributions use open-source fonts “Liberation fonts” to substitute Microsoft fonts by default.

The [Liberation Fonts](https://en.wikipedia.org/wiki/Liberation_fonts?ref=itsfoss.com) were created by [Red Hat](https://en.wikipedia.org/wiki/Red_Hat?ref=itsfoss.com) to substitute Arial, Arial Narrow, Times New Roman and Courier New as their width is the same. When you open a document written in Times New Roman, the equivalent Liberation Font will be used to keep the document uninterrupted.

However, Liberation fonts are not identical to Microsoft’s fonts and in some cases, you may need to use Arial or Times New Roman. A very common scenario is that Microsoft’s fonts are the only option in schools, universities and other public and private organizations. They require you to submit the documents in one of those fonts.

Good thing is that you can install the Microsoft fonts on Ubuntu and other distributions easily. This way, you will be able to increase the compatibility with LibreOffice and have the freedom to choose [open-source office software](https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/).

## Installing Microsoft fonts on Ubuntu-based Linux distributions

You can [install new fonts in Ubuntu](https://itsfoss.com/install-fonts-ubuntu/) by downloading them on your own. But since Microsoft fonts are very popular (and are provided free of cost), Ubuntu provides an easy way of installing them.

Be aware that despite Microsoft having released its core fonts free of charge, the usage of the fonts is restricted in other operating systems. You’ll have to read and accept [EULA (End User License Agreement)](https://en.wikipedia.org/wiki/End-user_license_agreement) before installing Microsoft fonts in Ubuntu.

These fonts are [available in the multiverse repositories](https://itsfoss.com/ubuntu-repositories/). Usually, they are enabled by default, but you should make sure it is enabled:

`sudo add-apt-repository multiverse`


After that, you can update your Ubuntu repository cache and install the Microsoft fonts like this:

`sudo apt update && sudo apt install ttf-mscorefonts-installer`


**Press the tab to select OK and press Enter when Microsoft’s End user agreement appears.**

![Accepting EULA While Installing Microsoft Fonts in Ubuntu](https://itsfoss.com/content/images/2023/03/accept-eula.png)

Click Yes to accept Microsoft’s agreement:

![Accepting EULA While Installing Microsoft Fonts in Ubuntu](https://itsfoss.com/content/images/2023/03/accept-truetype-eula-with-yes.png)

**Yes**and then press Enter

When the installation is done, you should update the font cache using the command below:

`sudo fc-cache -f -v`


![Update the font cache in terminal](https://itsfoss.com/content/images/2023/03/font-cache-succeeded.png)

If you open LibreOffice now, you’ll see the Microsoft [TrueType fonts](https://en.wikipedia.org/wiki/TrueType?ref=itsfoss.com).

![Times New Roman Font is used for text format in Libre Office](https://itsfoss.com/content/images/2023/03/times-new-roman-in-libre-office.png)

**In case you accidentally reject the license agreement, you can reinstall the installer with this command:**

`sudo apt install --reinstall ttf-mscorefonts-installer`


Microsoft TrueType fonts are also available via the [Ubuntu Restricted Extras package](https://itsfoss.com/install-media-codecs-ubuntu/) that contains other proprietary media codecs to play files like MP3 etc.

## Don’t underestimate proprietary fonts

You may think, what the big deal with fonts is? After all, it’s just a font, not a crucial piece of software, right?

But did you know that for years, [Netflix paid millions of dollars for the proprietary font](https://thehustle.co/nextflix-sans-custom-font/?ref=itsfoss.com) it used? In the end, they created their own custom fonts and that saved them a considerable amount of money.

By the way, you can easily install new fonts in Ubuntu. This tutorial will help you with that.

[How to Install New Fonts in Ubuntu and Other Linux DistributionsUbuntu does come with a bunch of fonts installed by default in it. But at times you might not be satisfied with the available fonts. If that’s the case, you can easily install additional fonts in Ubuntu, or any other Linux system such as Linux Mint. In this tutorial,](https://itsfoss.com/install-fonts-ubuntu/)![](https://itsfoss.com/content/images/wordpress/2015/01/Install-new-fonts-ubuntu.png)


![](https://itsfoss.com/content/images/wordpress/2015/01/Install-new-fonts-ubuntu.png)

Now you know about the fonts, what about [installing some Windows-only apps in Linux](https://itsfoss.com/use-windows-applications-linux/)?

Or do you want to try some [open-source alternatives to MS Office](https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/)?

More productivity tutorials are down the line; leave your comments below and subscribe to our social media for more!