在 Ubuntu 中安装 Tahoma 字体

use*_*645 8 package-management permissions fonts software-installation

当我尝试使用这些命令安装字体 Tahoma 时,出现两个错误(权限被拒绝):

$ cabextract -F 'tahoma*ttf' IELPKTH.CAB
IELPKTH.CAB: WARNING; possible 5592 extra bytes at end of file.
Extracting cabinet: IELPKTH.CAB
  extracting tahoma.ttf
tahoma.ttf: Permission denied
  extracting tahomabd.ttf
tahomabd.ttf: Permission denied

$ wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB
cabextract -F 'tahoma*ttf' IELPKTH.CAB
mkdir -p /usr/share/fonts/truetype/msttcorefonts/
mv -f tahoma*ttf /usr/share/fonts/truetype/msttcorefonts/
chmod 644 /usr/share/fonts/truetype/msttcorefonts/tahoma*
fc-cache -v
rm -f IELPKTH.CAB
Run Code Online (Sandbox Code Playgroud)

Ram*_*and 8

您可以尝试使用脚本:

#!/bin/bash
[ ! -f /usr/share/fonts/truetype/msttcorefonts/tahoma.ttf -o ! -f /usr/share/fonts/truetype/msttcorefonts/tahomabd.ttf ] &&
wget https://sourceforge.net/projects/corefonts/files/OldFiles/IELPKTH.CAB &&
cabextract -F 'tahoma*ttf' IELPKTH.CAB &&
mkdir -p /usr/share/fonts/truetype/msttcorefonts/ &&
mv -f tahoma*ttf /usr/share/fonts/truetype/msttcorefonts/ &&
chmod 644 /usr/share/fonts/truetype/msttcorefonts/tahoma* &&
fc-cache -v &&
rm -f IELPKTH.CAB &&
echo "Installed Tahoma"
Run Code Online (Sandbox Code Playgroud)


小智 0

我有同样的错误。您必须执行“sudo”并一一发出命令:

$ wget http://download.microsoft.com/download/ie6sp1/finrel/
$ cabextract -F 'tahoma*ttf' IELPKTH.CAB
$ sudo mv -f tahoma*ttf /usr/share/fonts/truetype/msttcorefonts/
$ chmod 644 /usr/share/fonts/truetype/msttcorefonts/tahoma*
$ fc-cache -v
$ rm -f IELPKTH.CAB
Run Code Online (Sandbox Code Playgroud)