Переустановите стандартные шрифты TrueType (Ubuntu 16.04)

Я случайно (безрассудно) rm -rf мой /usr/share/fonts/truetype каталог. Все мои шрифты TrueType исчезли. : / Есть ли способ вернуть их? Я на Ubuntu 16.04.

3
задан 2 August 2017 в 17:44

2 ответа

Я генерировал список пакетов, владеющих каждым каталогом в МОЙ /usr/share/fonts/truetype. (Я не повредил свои шрифты). Переустановите (с sudo apt-get install --reinstall <package> <...>:

w3@aardvark:~(0)$ for i in /usr/share/fonts/truetype/* ; do
> dpkg -S $i
> done
fonts-sil-abyssinica: /usr/share/fonts/truetype/abyssinica
fonts-ancient-scripts, fonts-symbola: /usr/share/fonts/truetype/ancient-scripts
fonts-gfs-artemisia: /usr/share/fonts/truetype/artemisia
fonts-gfs-baskerville: /usr/share/fonts/truetype/baskerville
fonts-gfs-bodoni-classic: /usr/share/fonts/truetype/bodoni-classic
fonts-dejavu-extra, fonts-dejavu-core: /usr/share/fonts/truetype/dejavu
fonts-gfs-didot: /usr/share/fonts/truetype/didot
fonts-gfs-didot-classic: /usr/share/fonts/truetype/didot-classic
fonts-droid: /usr/share/fonts/truetype/droid
fonts-font-awesome: /usr/share/fonts/truetype/font-awesome
fonts-guru-extra: /usr/share/fonts/truetype/fonts-guru-extra
dpkg-query: no path found matching pattern /usr/share/fonts/truetype/fonts-japanese-gothic.ttf
fonts-freefont-ttf: /usr/share/fonts/truetype/freefont
fonts-gfs-gazis: /usr/share/fonts/truetype/gazis
fonts-sil-gentium: /usr/share/fonts/truetype/gentium
fonts-sil-gentium-basic: /usr/share/fonts/truetype/gentium-basic
fonts-horai-umefont: /usr/share/fonts/truetype/horai-umefont
fonts-kacst: /usr/share/fonts/truetype/kacst
fonts-kacst-one: /usr/share/fonts/truetype/kacst-one
fonts-lao: /usr/share/fonts/truetype/lao
fonts-lato: /usr/share/fonts/truetype/lato
fonts-liberation: /usr/share/fonts/truetype/liberation
fonts-lohit-guru: /usr/share/fonts/truetype/lohit-punjabi
fonts-lyx: /usr/share/fonts/truetype/lyx
dpkg-query: no path found matching pattern /usr/share/fonts/truetype/msttcorefonts
fonts-nanum: /usr/share/fonts/truetype/nanum
fonts-gfs-neohellenic: /usr/share/fonts/truetype/neohellenic
fonts-gfs-olga: /usr/share/fonts/truetype/olga
fonts-opendin: /usr/share/fonts/truetype/opendin
fonts-opensymbol: /usr/share/fonts/truetype/openoffice
fonts-sil-padauk: /usr/share/fonts/truetype/padauk
fonts-gfs-porson: /usr/share/fonts/truetype/porson
fonts-lklug-sinhala: /usr/share/fonts/truetype/sinhala
fonts-gfs-solomos: /usr/share/fonts/truetype/solomos
fonts-takao-pgothic: /usr/share/fonts/truetype/takao-gothic
fonts-gfs-theokritos: /usr/share/fonts/truetype/theokritos
fonts-tibetan-machine: /usr/share/fonts/truetype/tibetan-machine
fonts-tlwg-waree-ttf, fonts-tlwg-umpush-ttf, fonts-tlwg-typo-ttf, fonts-tlwg-typist-ttf, fonts-tlwg-typewriter-ttf, fonts-tlwg-sawasdee-ttf, fonts-tlwg-purisa-ttf, fonts-tlwg-norasi-ttf, fonts-tlwg-mono-ttf, fonts-tlwg-loma-ttf, fonts-tlwg-laksaman-ttf, fonts-tlwg-kinnari-ttf, fonts-tlwg-garuda-ttf: /usr/share/fonts/truetype/tlwg
ttf-bitstream-vera: /usr/share/fonts/truetype/ttf-bitstream-vera
ttf-dejavu-extra, ttf-dejavu-core: /usr/share/fonts/truetype/ttf-dejavu
ttf-indic-fonts-core: /usr/share/fonts/truetype/ttf-indic-fonts-core
ttf-marvosym: /usr/share/fonts/truetype/ttf-marvosym
ttf-xfree86-nonfree: /usr/share/fonts/truetype/ttf-xfree86-nonfree
ttf-ubuntu-font-family: /usr/share/fonts/truetype/ubuntu-font-family
fonts-unfonts-core: /usr/share/fonts/truetype/unfonts-core
ttf-unifont: /usr/share/fonts/truetype/unifont
fonts-wqy-microhei: /usr/share/fonts/truetype/wqy
w3@aardvark:~(0)$ 
3
ответ дан 3 August 2017 в 03:44

Всего прошел это с другим пользователем для другого каталога. Вы видите, какие пакеты имели файлы в каталоге. В моем случае:

$ dpkg -S /usr/share/fonts/truetype | cut -sd: -f1 | tr -d , | fold -w80
fonts-opensymbol ttf-mscorefonts-installer ttf-ubuntu-font-family fonts-symbola 
fonts-liberation fonts-freefont-ttf fonts-droid-fallback fonts-dejavu-core

Мы можем полировать это в единственную команду, которая просто переустанавливает все те пакеты:

sudo apt install --reinstall $(dpkg -S /usr/share/fonts/truetype | cut -sd: -f1 | tr -d ,)

преимущество здесь, Вы переустанавливаете файлы на основе Ваш пакеты.

8
ответ дан 3 August 2017 в 03:44

Другие вопросы по тегам:

Похожие вопросы: