正在下载Google字体

是否可以下载所有谷歌字体并在Ubuntu下提供? 这将有助于我的webdev。

如果您信任webupd8 :

cd ~/Downloads && wget http://webupd8.googlecode.com/files/install-google-fonts chmod +x install-google-fonts ./install-google-fonts 

如果有人需要检查而不下载: 这是 “install-google-fonts” 的源代码 :

 $ more install-google-fonts # Original author: Michalis Georgiou  # Modified by Andrew http://www.webupd8.org  sudo apt-get install mercurial _hgroot="https://googlefontdirectory.googlecode.com/hg/" _hgrepo="googlefontdirectory" echo "Connecting to Mercurial server...." if [ -d $_hgrepo ] ; then cd $_hgrepo hg pull -u || return 1 echo "The local files have been updated." cd .. else hg clone $_hgroot $_hgrepo || return 1 fi echo "Mercurial checkout done or server timeout" sudo mkdir -p /usr/share/fonts/truetype/google-fonts/ find $PWD/$_hgrepo/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/t ruetype/google-fonts/ \; || return 1 fc-cache -f > /dev/null echo "done." 

使用这些终端命令可以更轻松地:

 sudo apt-get update sudo apt-get install tasksel sudo tasksel 

它会向您展示一堆包裹集合,然后只需选择:

[*]大量选择字体包

然后给它一个OK。 希望它满足您的设计需求:)

一种更简单的方法是直接从Github获取它们: https : //github.com/google/fonts/tree/master/apache 。 每种字体都有自己的子目录,带有未压缩的字体文件。

还有主要的https://github.com/google/fonts#readme页面中的ZIP文件。

所以,如果你想编写这些东西的脚本(例如定期下载最新版本),你可以使用Git checkout,或使用wget或curl来下拉你想要的确切文件。

PS:这个post是“ 如何安装字体? ”的副本。