README.md in fontist-1.7.1 vs README.md in fontist-1.7.2
- old
+ new
@@ -107,11 +107,11 @@
fonts in your system.
#### Find formula fonts
Normally, each font name can be associated with multiple styles or collection, for
-example the `Calibri` font might contains a `regular`, `bola` or `italic` styles
+example the `Calibri` font might contains a `regular`, `bold` or `italic` styles
fonts and if you want a interface that can return the complete list then this is
your friend. You can use it as following:
```ruby
Fontist::Formula.find_fonts("Calibri")
@@ -151,15 +151,18 @@
```ruby
Fontist::Manifest::Locations.call(manifest_path)
```
```ruby
-{"Segoe UI"=>
- {"Regular"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"],
- "Bold"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]},
- "Roboto Mono"=>
- {"Regular"=>[]}}
+{"Segoe UI"=> {
+ "Regular"=>{"full_name"=>"Segoe UI",
+ "paths"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"]},
+ "Bold"=>{"full_name"=>"Segoe UI Bold",
+ "paths"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]}},
+ "Roboto Mono"=> {
+ "Regular"=>{"full_name"=>nil,
+ "paths"=>[]}}}
```
#### Install
Fontist lets not only to get font locations but also to install fonts from the
@@ -170,15 +173,18 @@
```
It will install fonts and return their locations:
```ruby
-{"Segoe UI"=>
- {"Regular"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"],
- "Bold"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]},
- "Roboto Mono"=>
- {"Regular"=>["/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"]}}
+{"Segoe UI"=> {
+ "Regular"=>{"full_name"=>"Segoe UI",
+ "paths"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"]},
+ "Bold"=>{"full_name"=>"Segoe UI Bold",
+ "paths"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]}},
+ "Roboto Mono"=> {
+ "Regular"=>{"full_name"=>"Roboto Mono Regular",
+ "paths"=>["/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"]}}}
```
### CLI
These commands makes possible to operate with fonts via command line. The CLI
@@ -189,11 +195,12 @@
#### Install
The `install` command is similar to the `Font.install` call. It first checks
whether this font is already installed, and if not, then installs the font and
-returns its paths. Font or formula could be specified as a name.
+returns its paths. Only font name (not formula name, nor font filename) could
+be used as a parameter.
```
$ fontist install "segoe ui"
These fonts are found or installed:
/Users/user/.fontist/fonts/SEGOEUI.TTF
@@ -272,15 +279,21 @@
```yml
$ fontist manifest-locations manifest.yml
---
Segoe UI:
Regular:
- - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
+ full_name: Segoe UI
+ paths:
+ - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
Bold:
- - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
+ full_name: Segoe UI Bold
+ paths:
+ - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
Roboto Mono:
- Regular: []
+ Regular:
+ full_name:
+ paths: []
```
Since Segoe UI is installed, but Roboto Mono is not.
#### Install from manifest
@@ -290,23 +303,38 @@
```yml
$ fontist manifest-install --confirm-license manifest.yml
---
Segoe UI:
Regular:
- - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
+ full_name: Segoe UI
+ paths:
+ - "/Users/user/.fontist/fonts/SEGOEUI.TTF"
Bold:
- - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
+ full_name: Segoe UI Bold
+ paths:
+ - "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
Roboto Mono:
Regular:
- - "/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"
+ full_name: Roboto Mono Regular
+ paths:
+ - "/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"
```
#### Help
List of all commands could be seen by:
```
fontist help
+```
+
+### Configuration
+
+By default Fontist uses the `~/.fontist` directory to store fonts and its
+files. It could be changed with the `FONTIST_PATH` environment variable.
+
+```sh
+FONTIST_PATH=~/.fontist_new fontist update
```
## Development
We are following Sandi Metz's Rules for this gem, you can read the