fontist 1.19.0 → 1.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/deploy-pages.yml +48 -0
- data/.github/workflows/tebako-pack.yml +61 -0
- data/.github/workflows/test-and-release.yml +2 -1
- data/LICENSE.txt +1 -2
- data/README.adoc +24 -2
- data/docs/.gitignore +136 -0
- data/docs/.vitepress/config.ts +83 -0
- data/docs/guide/api-ruby.md +190 -0
- data/docs/guide/ci.md +29 -0
- data/docs/guide/fontconfig.md +23 -0
- data/docs/guide/index.md +67 -0
- data/docs/guide/proxy.md +47 -0
- data/docs/guide/why.md +7 -0
- data/docs/index.md +40 -0
- data/docs/package-lock.json +1791 -0
- data/docs/package.json +17 -0
- data/docs/public/hero.png +0 -0
- data/docs/public/logo.png +0 -0
- data/docs/reference/index.md +143 -0
- data/exe/fontist +1 -2
- data/fontist.gemspec +3 -0
- data/lib/fontist/cli/class_options.rb +7 -0
- data/lib/fontist/cli/thor_ext.rb +79 -0
- data/lib/fontist/cli.rb +2 -0
- data/lib/fontist/config.rb +2 -1
- data/lib/fontist/font.rb +55 -10
- data/lib/fontist/font_installer.rb +22 -51
- data/lib/fontist/formula.rb +77 -3
- data/lib/fontist/formula_suggestion.rb +55 -0
- data/lib/fontist/helpers.rb +2 -0
- data/lib/fontist/import/create_formula.rb +77 -35
- data/lib/fontist/import/formula_builder.rb +63 -81
- data/lib/fontist/import/google/api.rb +25 -0
- data/lib/fontist/import/google/create_google_formula.rb +89 -0
- data/lib/fontist/import/google_import.rb +63 -32
- data/lib/fontist/import/recursive_extraction.rb +0 -16
- data/lib/fontist/manifest/locations.rb +2 -0
- data/lib/fontist/resources/archive_resource.rb +55 -0
- data/lib/fontist/resources/google_resource.rb +64 -0
- data/lib/fontist/style_version.rb +4 -0
- data/lib/fontist/utils/cache.rb +16 -0
- data/lib/fontist/utils/downloader.rb +9 -2
- data/lib/fontist/utils/ui.rb +10 -2
- data/lib/fontist/version.rb +1 -1
- data/lib/fontist.rb +13 -1
- metadata +67 -6
- data/lib/fontist/import/google/new_fonts_fetcher.rb +0 -146
- data/lib/fontist/import/google/skiplist.yml +0 -12
- data/lib/fontist/import/google_check.rb +0 -27
data/docs/guide/index.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Getting started
|
2
|
+
|
3
|
+
The easiest way to get started with Fontist is to install the Fontist CLI. There's also a [fontist RubyGem package](/guide/api-ruby) that you can use from your Ruby code.
|
4
|
+
|
5
|
+
```sh
|
6
|
+
gem install fontist
|
7
|
+
```
|
8
|
+
|
9
|
+
💎 Don't have Ruby installed? You can [download Ruby from the official Ruby website](https://www.ruby-lang.org/en/downloads/).
|
10
|
+
|
11
|
+
Now you're ready to start using Fontist to install fonts on your machine! 🤩
|
12
|
+
|
13
|
+
```sh
|
14
|
+
fontist install "Fira Code"
|
15
|
+
fontist install "Open Sans"
|
16
|
+
fontist install "Consolas"
|
17
|
+
```
|
18
|
+
|
19
|
+
<sup>👩⚖️ Some fonts may require you to accept license terms regarding their use.</sup>
|
20
|
+
|
21
|
+
## Using a Fontist manifest
|
22
|
+
|
23
|
+
Several fonts can be specified in a file, called "manifest", and installed together.
|
24
|
+
|
25
|
+
First, prepare a file "manifest.yml":
|
26
|
+
|
27
|
+
```yaml
|
28
|
+
---
|
29
|
+
Times New Roman:
|
30
|
+
Arial:
|
31
|
+
Courier New:
|
32
|
+
---
|
33
|
+
```
|
34
|
+
|
35
|
+
Then run:
|
36
|
+
|
37
|
+
```sh
|
38
|
+
fontist manifest-install manifest.yml
|
39
|
+
```
|
40
|
+
|
41
|
+
```
|
42
|
+
---
|
43
|
+
Arial:
|
44
|
+
Regular:
|
45
|
+
full_name: Arial
|
46
|
+
paths:
|
47
|
+
- "/home/octocat/.fontist/fonts/Arial.ttf"
|
48
|
+
Bold Italic:
|
49
|
+
...
|
50
|
+
```
|
51
|
+
|
52
|
+
💡 You can use `fontist manifest-locations` to get the installation paths of **only the fonts listed in the manifest file**.
|
53
|
+
|
54
|
+
```sh
|
55
|
+
fontist manifest-locations manifest.yml
|
56
|
+
```
|
57
|
+
|
58
|
+
```
|
59
|
+
---
|
60
|
+
Arial:
|
61
|
+
Regular:
|
62
|
+
full_name: Arial
|
63
|
+
paths:
|
64
|
+
- "/home/octocat/.fontist/fonts/Arial.ttf"
|
65
|
+
Bold Italic:
|
66
|
+
...
|
67
|
+
```
|
data/docs/guide/proxy.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# Using Fontist with a proxy
|
2
|
+
|
3
|
+
Fontist uses Git internally for fetching formulas and fonts.
|
4
|
+
|
5
|
+
In order to use Git functionality behind a proxy, you need to update your own
|
6
|
+
Git config via the `git config` command or the `~/.gitconfig` preference file.
|
7
|
+
|
8
|
+
There are many ways to configure your local Git install to use proxies.
|
9
|
+
|
10
|
+
The simplest, global way of setting a proxy for Git is the following.
|
11
|
+
|
12
|
+
For HTTP
|
13
|
+
|
14
|
+
```sh
|
15
|
+
git config --global http.proxy http://{user}:{pass}@{proxyhost}:{port}
|
16
|
+
```
|
17
|
+
|
18
|
+
For HTTPS, you may need to handle SSL/TLS verification errors after setting
|
19
|
+
the proxy since the encryption end is located at your HTTPS proxy endpoint:
|
20
|
+
|
21
|
+
```sh
|
22
|
+
git config --global http.proxy https://{user}:{pass}@{proxyhost}:{port}
|
23
|
+
git config --global https.proxy https://{user}:{pass}@{proxyhost}:{port}
|
24
|
+
```
|
25
|
+
|
26
|
+
For SOCKS, you will need to decide on the SOCKS protocol:
|
27
|
+
|
28
|
+
```sh
|
29
|
+
git config --global http.proxy '{protocol}://{user}:{pass}@{proxyhost}:{port}'
|
30
|
+
git config --global https.proxy '{protocol}://{user}:{pass}@{proxyhost}:{port}'
|
31
|
+
```
|
32
|
+
|
33
|
+
For example,
|
34
|
+
|
35
|
+
```sh
|
36
|
+
git config --global http.proxy 'socks5h://user:pass@socks-proxy.example.org'
|
37
|
+
git config --global https.proxy 'socks5h://user:pass@socks-proxy.example.org'
|
38
|
+
```
|
39
|
+
|
40
|
+
The list of supported SOCKS protocols for the `{protocol}` field:
|
41
|
+
|
42
|
+
- `socks://`: for SOCKS below v5
|
43
|
+
- `socks5://`: for SOCKS v5
|
44
|
+
- `socks5h://`: for SOCKS below v5 + host resolution via SOCKS
|
45
|
+
|
46
|
+
You could actually set different proxy behavior for individual Git repositories
|
47
|
+
— please see this [great guide](https://gist.github.com/evantoli/f8c23a37eb3558ab8765) on how to use Git proxies (thanks to the GitHub user [evantoli](https://github.com/evantoli)).
|
data/docs/guide/why.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Why Fontist?
|
2
|
+
|
3
|
+
In general, fonts can be downloaded manually and placed in a system folder. Some fonts are even pre-installed with an OS. **This is inconsistent across Windows, macOS, and Linux.**
|
4
|
+
|
5
|
+
Fontist is a higher level abstraction that lets you use `fontist install` (or the `Fontist::Fontist` Ruby library) to manage your fonts with the same API across multiple platforms.
|
6
|
+
|
7
|
+
Fontist uses a formula repository to find where to download a requested font. The main formula repository contains a lot of fonts, including Google Fonts, SIL Fonts, and macOS add-on fonts.
|
data/docs/index.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
# https://vitepress.dev/reference/default-theme-home-page
|
3
|
+
layout: home
|
4
|
+
|
5
|
+
hero:
|
6
|
+
# name: "Fontist"
|
7
|
+
text: "Manage your fonts effortlessly"
|
8
|
+
tagline: Fontist brings cross-platform font management to the command line for Windows, Linux, and macOS. Free and open source.
|
9
|
+
image:
|
10
|
+
src: /hero.png
|
11
|
+
actions:
|
12
|
+
- theme: brand
|
13
|
+
text: 🚀 Get started
|
14
|
+
link: /guide/
|
15
|
+
- theme: alt
|
16
|
+
text: 💎 Ruby API
|
17
|
+
link: /guide/api-ruby
|
18
|
+
- theme: alt
|
19
|
+
text: 🍰 Formulas
|
20
|
+
link: https://fontist.org/formulas/
|
21
|
+
target: _self
|
22
|
+
---
|
23
|
+
|
24
|
+
<!-- Excerpt from the Getting Started guide page. Try to keep it in sync! -->
|
25
|
+
|
26
|
+
```sh
|
27
|
+
gem install fontist
|
28
|
+
```
|
29
|
+
|
30
|
+
💎 Don't have Ruby installed? You can [download Ruby from the official Ruby website](https://www.ruby-lang.org/en/downloads/).
|
31
|
+
|
32
|
+
Now you're ready to start using Fontist to install fonts on your machine! 🤩
|
33
|
+
|
34
|
+
```sh
|
35
|
+
fontist install "Fira Code"
|
36
|
+
fontist install "Open Sans"
|
37
|
+
fontist install "Consolas"
|
38
|
+
```
|
39
|
+
|
40
|
+
[📚 Read more in the Getting Started guide](/guide/)
|