├── .github └── screenshots │ └── WinExplorerInstall.png ├── .gitignore ├── LICENSE ├── README.md ├── install-linux.sh ├── install-osx.sh └── script.sh /.github/screenshots/WinExplorerInstall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theel0ja/googlefonts-loader/31eb35a75862c64d5593696499679d76fb879b46/.github/screenshots/WinExplorerInstall.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | repo/ 2 | fonts/ 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Elias Ojala 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # googlefonts-loader 2 | Copy all Google Fonts to a folder. 3 | 4 | If you want to block requests to Google Fonts on your browser, add [Block Google Fonts by Crapblock](https://crapblock.theel0ja.info/) to your browser. 5 | 6 | ## Usage on macOS 7 | 8 | ```bash 9 | ./script.sh 10 | # after that has finished, run to install: 11 | ./install-osx.sh 12 | ``` 13 | 14 | ## Usage on Windows 15 | 16 | Tested with Git Bash. 17 | 18 | 1. First, run the script: 19 | ```bash 20 | ./script.sh 21 | ``` 22 | 2. After that has finished, open `fonts/` with the File Explorer. 23 | 1. Select all files. (ctrl+a) 24 | 2. Right-click and click Install. 25 | [![](.github/screenshots/WinExplorerInstall.png)](.github/screenshots/WinExplorerInstall.png) 26 | 27 | -------------------------------------------------------------------------------- /install-linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | mkdir ~/.fonts/ 3 | mv fonts/ ~/.fonts/google/ 4 | -------------------------------------------------------------------------------- /install-osx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | mv fonts/ ~/Library/Fonts/google 3 | -------------------------------------------------------------------------------- /script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Install all fonts from Google Fonts 3 | # 4 | # (C) Elias Ojala 5 | # https://github.com/theel0ja 6 | 7 | FONTS_FOLDER=./fonts/ 8 | 9 | mkdir -p $FONTS_FOLDER 10 | 11 | git clone https://github.com/google/fonts repo/ 12 | 13 | function move_to_folder { 14 | while read font_path 15 | do 16 | 17 | echo "Processing font: $font_path" 18 | 19 | cp $font_path $FONTS_FOLDER 20 | 21 | done < "${1:-/dev/stdin}" 22 | } 23 | 24 | find ./repo -type f | grep -v .git \ 25 | | grep -v ".txt" | grep -v ".md" | grep -v ".sh" | grep -v ".html" | grep -v ".category" \ 26 | | grep -v "METADATA" | grep -v "README" | grep -v "AUTHORS" | grep -v "CONTRIBUTORS" \ 27 | | grep -v ".lao" | grep -v ".korean" | grep -v ".tamil" | grep -v ".bengali" | move_to_folder 28 | --------------------------------------------------------------------------------