Skip to content

Instantly share code, notes, and snippets.

@nelsonaloysio
Created May 19, 2023 22:50
Show Gist options
  • Select an option

  • Save nelsonaloysio/aeac243702a73b5d05b9b313d082ef96 to your computer and use it in GitHub Desktop.

Select an option

Save nelsonaloysio/aeac243702a73b5d05b9b313d082ef96 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Downloads and extracts Microsoft core fonts.
# To make it available, move the output files to:
#
# User-wide: ~/.local/share/fonts [or] ~/.fonts
# System-wide: /usr/share/fonts
#
# Requires `cabextract`.
#
# Original source:
# https://discussion.fedoraproject.org/t/ms-core-fonts-on-silverblue/1916/5
mkdir -p mscorefonts
cd mscorefonts
url="http://downloads.sourceforge.net/corefonts"
fonts=(\
andale
arial
arialb
comic
courie
georgi
impact
times
trebuc
verdan
webdin)
for i in "${fonts[@]}"; do
wget "${url}/${i}32.exe"
cabextract "${i}32.exe" -d mscorefonts
rm "${i}32.exe"
break
done
mv mscorefonts/*{ttf,TTF} .
rm -d mscorefonts/*{DLL,exe,EXE,inf,TXT} mscorefonts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment