当前位置: 首页 > 科技观察

在Ubuntu18.04LTS上安装MicrosoftWindows字体

时间:2023-03-20 14:05:51 科技观察

大多数教育机构仍然使用Microsoft字体,我不知道其他国家的情况。但在泰米尔纳德邦(印度的一个邦),TimesNewRoman和Arial字体主要用于几乎所有大学和学校的文档工作、项目和作业。不仅教育机构而且一些小型组织、办公室和商店仍在使用MSWindows字体。为了以防万一,如果您需要在Ubuntu桌面上使用Microsoft字体,请按照以下步骤进行安装。免责声明:Microsoft免费分发其核心字体。但请注意,Microsoft字体禁止在其他操作系统中使用。在任何Linux操作系统中安装MS字体之前,请仔细阅读EULA。我们不对此类盗版行为负责。(LCTT译注:本文仅作技术讨论,并不代表作者、译者和本站鼓励任何行为。)在Ubuntu18.04LTS桌面版上安装MS字体安装MSTrueType字体如下:$sudoaptupdate$sudoaptinstallttf-mscorefonts-installer然后会出现微软的最终用户协议向导,点击确定继续。点击Yes接受微软的同意:安装字体后,我们需要使用命令行来更新字体缓存:$sudofc-cache-f-v示例输出:/usr/share/fonts:caching,newcachecontents:0字体,6dirs/usr/share/fonts/X11:缓存,新缓存内容:0字体,4dirs/usr/share/fonts/X11/Type1:缓存,新缓存内容:8字体,0dirs/usr/share/fonts/X11/encodings:缓存,新缓存内容:0字体,1dirs/usr/share/fonts/X11/encodings/large:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/X11/misc:缓存,新缓存内容:89种字体,0dirs/usr/share/fonts/X11/util:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/cMap:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/cmap:缓存,新缓存内容:0字体,5dirs/usr/share/fonts/cmap/adobe-cns1:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/cmap/adobe-gb1:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/cmap/adobe-japan1:caching,新缓存内容:0字体,0dirs/usr/share/fonts/cmap/adobe-japan2:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/cmap/adobe-korea1:缓存,新缓存内容:0字体,0dirs/usr/share/fonts/opentype:缓存,新缓存内容:0种字体,2dirs/usr/share/fonts/opentype/malayalam:缓存,新缓存内容:3种字体,0dirs/usr/share/fonts/opentype/noto:缓存,新缓存内容:24种字体,0dirs/usr/share/fonts/truetype:缓存,新缓存内容:0种字体,46dirs/usr/share/fonts/truetype/Gargi:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/Gubbi:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/Nakula:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/Navilu:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/Sahadeva:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/Sarai:缓存,新的缓存内容:1个字体,0个dirs/usr/share/fonts/truetype/abyssinica:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/dejavu:缓存,新缓存内容:6种字体,0dirs/usr/share/fonts/truetype/droid:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/fonts-beng-extra:缓存,新缓存内容:6种字体,0dirs/usr/share/fonts/truetype/fonts-deva-extra:缓存,新缓存内容:3种字体,0dirs/usr/share/fonts/truetype/fonts-gujr-extra:缓存,新缓存内容:5种字体,0dirs/usr/share/fonts/truetype/fonts-guru-extra:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/fonts-kalapi:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/fonts-orya-extra:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/fonts-telu-extra:缓存,新缓存内容:2种字体,0dirs/usr/share/fonts/truetype/freefont:缓存,新缓存内容:12种字体,0dirs/usr/share/fonts/truetype/kacst:缓存,新缓存内容:15种字体,0dirs/usr/share/fonts/truetype/kacst-one:缓存,新缓存内容:2种字体,0dirs/usr/share/fonts/truetype/lao:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/liberation:缓存,新缓存内容:16种字体,0dirs/usr/share/fonts/truetype/liberation2:缓存,新缓存内容:12种字体,0dirs/usr/share/fonts/truetype/lohit-assamese:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-bengali:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-天城文:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-gujarati:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-kannada:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-malayalam:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-oriya:缓存,新的缓存内容:1个字体,0个dirs/usr/share/fonts/truetype/lohit-punjabi:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-tamil:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-tamil-经典:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/lohit-telugu:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/malayalam:缓存,新缓存内容:11种字体,0dirs/usr/share/fonts/truetype/msttcorefonts:缓存,新缓存内容:60种字体,0dirs/usr/share/fonts/truetype/noto:缓存,新缓存内容:2种字体,0dirs/usr/share/fonts/truetype/openoffice:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/padauk:缓存,新缓存内容:4种字体,0dirs/usr/share/fonts/truetype/pagul:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/samyak:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/samyak-fonts:缓存,新的缓存内容:3种字体,0dirs/usr/share/fonts/truetype/sinhala:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/tibetan-machine:缓存,新缓存内容:1种字体,0dirs/usr/share/fonts/truetype/tlwg:缓存,新缓存内容:58种字体,0dirs/usr/share/fonts/truetype/ttf-khmeros-core:缓存,新缓存内容:2种字体,0dirs/usr/share/fonts/truetype/ubuntu:缓存,新缓存内容:13种字体,0dirs/usr/share/fonts/type1:缓存,新缓存内容:0字体,1dirs/usr/share/fonts/type1/gsfonts:缓存,新缓存内容:35种字体,0dirs/usr/local/share/fonts:缓存,新缓存内容:0种字体,0dirs/home/sk/.local/share/fonts:跳过,没有这样的目录/home/sk/.fonts:skipping,nosuchdirectory/var/cache/fontconfig:cleaningcachedirectory/home/sk/.cache/fontconfig:cleaningcachedirectory/home/sk/.fontconfig:notcleaningnon-existentcachedirectoryfc-cache:succeededinLinux和Windows双启动的机器上安装MS字体如果你有Linux和Windows的双启动系统,你可要从WindowsC驱动器轻松安装MS字体,您只需挂载Windows分区(C:/windows)。我假设您已经在Linux中的/Windowsdrive目录下挂载了C:\Windows分区。现在,将字体位置链接到Linux系统的字体文件夹,如下所示:ln-s/Windowsdrive/Windows/Fonts/usr/share/fonts/WindowsFonts链接字体文件后,使用命令行重新生成fontconfig缓存:fc-cache或者,将所有Windows字体复制到/usr/share/fonts目录并使用以下命令安装字体:mkdir/usr/share/fonts/WindowsFontscp/Windowsdrive/Windows/Fonts/*/usr/share/fonts/WindowsFontschmod755/usr/share/fonts/WindowsFonts/****,使用命令行缓存重新生成fontconfig:fc-cache测试Windows字体安装MS字体后打开LibreOffice或GIMP。您现在将看到Microsoftcoretype字体。就是这样,我希望本指南有用。我再次警告你,禁止在其他操作系统中使用MS字体。请在安装MS字体之前阅读Microsoft许可协议。如果您觉得我们的指南有用,请在您的社区、专业网络中分享和支持我们。还有更多美好等着我们。继续参观!