Você, amigo leitor, apaixonado por Linux, pode ter todas as fontes disponíveis no Google Fonts no seu sistema operacional. Se você precisa de mais opções de fontes para desenvolver o seu trabalho, veja agora como instalar as fontes do Google no Linux.
Instalando as fontes do Google no Ubuntu e derivados
Primeiramente, iremos realizar o download do script para o computador:
Para fins de conferência, o conteúdo do script é o seguinte:
[accordions]
[accordion title=Google-fonts — Ubuntu]
# Original author: Michalis Georgiou <[email protected]> # Modified by Andrew http://www.webupd8.org <[email protected]> # Modified by Velimir Matic https://github.com/veljamatic <[email protected]> _wgeturl="https://github.com/google/fonts/archive/master.tar.gz" _gf="google-fonts" # install wget # sudo apt-get install wget apt-get install wget # make sure a file with the same name doesn't already exist rm -f $_gf.tar.gz echo "Connecting to Github server..." wget $_wgeturl -O $_gf.tar.gz echo "Extracting the downloaded archive..." tar -xf $_gf.tar.gz echo "Creating the /usr/share/fonts/truetype/$_gf folder" # sudo mkdir -p /usr/share/fonts/truetype/$_gf mkdir -p /usr/share/fonts/truetype/$_gf echo "Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf" # find $PWD/fonts-master/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ ; || return 1 find $PWD/fonts-master/ -name "*.ttf" -exec install -m644 {} /usr/share/fonts/truetype/google-fonts/ ; || return 1 echo "Updating the font cache" fc-cache -f > /dev/null # clean up, but only the .tar.gz, the user may need the folder rm -f $_gf.tar.gz echo "Done."
[/accordion]
[/accordions]
sudo curl -L https://gist.githubusercontent.com/veljamatic/0ef708f4c14f69a88df2b1494b7d3973/raw/4b2e5ccd16afcb48903d19d0918d9d48a9710e8b/install-google-fonts >> google-fonts.sh
Vamos dar permissão de execução no arquivo e executá-lo em seguida:
chmod +x google-fonts.sh
sudo ./google-fonts.sh
Building dependency tree
Reading state information… Done
wget is already the newest version (1.19.4-1ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
Connecting to Github server…
–2018-11-21 16:29:58– https://github.com/google/fonts/archive/master.tar.gz
Resolving github.com (github.com)… 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/google/fonts/tar.gz/master [following]
–2018-11-21 16:29:59– https://codeload.github.com/google/fonts/tar.gz/master
Resolving codeload.github.com (codeload.github.com)… 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 381910243 (364M) [application/x-gzip]
Saving to: ‘google-fonts.tar.gz’
google-fonts.tar.gz 100%[===================>] 364,22M 1,05MB/s in 7m 13s
2018-11-21 16:37:13 (861 KB/s) – ‘google-fonts.tar.gz’ saved [381910243/381910243]
Extracting the downloaded archive…
Creating the /usr/share/fonts/truetype/google-fonts folder
Installing all .ttf fonts in /usr/share/fonts/truetype/google-fonts
Updating the font cache
Done.
Instalando as fontes do Google no Fedora e derivados
O conteúdo do arquivo para Fedora é similar ao arquivo do Ubuntu, mudando apenas os comandos para instalação de alguns pacotes:
[accordions]
[accordion title=Google-fonts — Fedora]
# Original : Michalis Georgiou # Modified : D4zzy for Fedora _wgeturl="https://github.com/google/fonts/archive/master.tar.gz" _gf="google-fonts" # install wget echo "Installing wget..." sudo dnf install wget echo "Connecting to Github server..." wget $_wgeturl -O $_gf.tar.gz echo "Extracting the downloaded archive..." tar -xf $_gf.tar.gz echo "Creating the /usr/share/fonts/truetype/$_gf folder" sudo mkdir -p /usr/share/fonts/truetype/$_gf echo "Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf" find $PWD/fonts-master/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ ; || return 1 echo "Updating the font cache" fc-cache -f > /dev/null # clean up, but only the .tar.gz, the user may need the folder rm -f $_gf.tar.gz echo "Job Done - enjoy your fonts..."
[/accordion]
[/accordions]
sudo curl -L https://gist.githubusercontent.com/dyoungwd/aa3ac8dd6241b429a2693f41a65d422f/raw/43ec6c07996c61dcdcf4fd32b96fd1d87389d9fe/google-fonts.sh
Vamos dar permissão de execução no arquivo e executá-lo em seguida:
chmod +x google-fonts.sh
sudo ./google-fonts.sh
Última verificação de data de vencimento de metadados: 0:08:30 atrás em qua 2
1 nov 2018 16:37:14 -03.
Package wget-1.19.5-5.fc29.x86_64 is already installed.
Dependências resolvidas.
Nada para fazer.
Concluído!
Connecting to Github server…
–2018-11-21 16:45:46– https://github.com/google/fonts/archive/master.tar.g
z
Resolvendo github.com (github.com)… 192.30.253.112, 192.30.253.113
Conectando-se a github.com (github.com)|192.30.253.112|:443… conectado.
A requisição HTTP foi enviada, aguardando resposta… 302 Found
Localização: https://codeload.github.com/google/fonts/tar.gz/master [redireci
onando]
–2018-11-21 16:45:47– https://codeload.github.com/google/fonts/tar.gz/mast
er
Resolvendo codeload.github.com (codeload.github.com)… 192.30.253.121, 192.3
0.253.120
Conectando-se a codeload.github.com (codeload.github.com)|192.30.253.121|:443
… conectado.
A requisição HTTP foi enviada, aguardando resposta… 200 OK
Tamanho: não especificada [application/x-gzip]
Salvando em: “google-fonts.tar.gz”
google-fonts.tar.gz [ <=> ] 364,22M 900KB/s em 7m 21s
2018-11-21 16:53:09 (845 KB/s) – “google-fonts.tar.gz” salvo [381910243]
Extracting the downloaded archive…
Creating the /usr/share/fonts/truetype/google-fonts folder
Installing all .ttf fonts in /usr/share/fonts/truetype/google-fonts
Updating the font cache
Done.