https://github.com/zerox-dg/gofont
A simple google font downloader written in Golang
https://github.com/zerox-dg/gofont
downloader font golang google
Last synced: about 2 months ago
JSON representation
A simple google font downloader written in Golang
- Host: GitHub
- URL: https://github.com/zerox-dg/gofont
- Owner: ZeroX-DG
- License: mit
- Created: 2019-01-08T06:58:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-09T05:34:42.000Z (over 7 years ago)
- Last Synced: 2025-04-19T08:17:32.423Z (about 1 year ago)
- Topics: downloader, font, golang, google
- Language: Go
- Size: 12.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gofont
_A simple google font downloader written in Golang_
## About this project
This project contains my very first lines of golang. I created this project mainly because I want to try out Go (I really hate it so far).
## What does it do?
Just feed it an url to google font api and it will download that font to your desired location!
**Example of a google font api url**
```
https://fonts.googleapis.com/css?family=Charm|Dancing+Script
```
### Example 1: Download fonts from google to a directory
Syntax:
```
$ gofont "" ""
```
Example:
```
$ gofont "https://fonts.googleapis.com/css?family=Charm|Dancing+Script" "fonts"
```
### Example 2: Download fonts from google and generate a css file for that font
Syntax:
```
$ gofont --cssFile="" "" ""
```
Example:
```
$ gofont --cssFile="./styles/fonts.css" "https://fonts.googleapis.com/css?family=Charm|Dancing+Script" "fonts"
```
## Todo
I'm still trying out Go so maybe I'll add some more features such as:
- [x] Generate a CSS file pointing to the location of the downloaded font
- [ ] Make logger more colorful by printing the details with color
- [x] Cry a lot because I don't understand how Go `import` works
- [ ] Search for fonts on google fonts
## License
- [MIT](LICENSE)