Skip to content

Commit

Permalink
Add a section to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Jun 6, 2022
1 parent cd0f2f6 commit 54cb99b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ Run subfont on the files you are ready to deploy to a static file hosting servic

If you want to run directly against your raw original files, it is recommended to create a recursive copy of your files which you run `subfont` on. This keeps your original authoring abstraction unchanged.

## Including additional characters in the subsets

If you have a use case where the automatic tracing doesn't find all the characters you need, you can tell subfont to include specific characters in the subsets by adding a custom `-subfont-text` property to the respective `@font-face` declarations.

Example where all numerical digits are added to the bold italic Roboto variant:

```css
@font-face {
font-family: Roboto;
font-style: italic;
font-weight: 700;
src: url(roboto.woff) format('woff');
-subfont-text: '0123456789';
}
```

An easier, but less fine-grained option is to use the `--text` switch to include a set of characters in all created subsets.

## Other usages

You can have subfont output a copy of your input files to a new directory. This uses [Assetgraph](/~https://github.com/assetgraph/assetgraph) to trace a dependency graph of your website and writes it to your specified output directory. Be aware of any errors or warnings that might indicate Assetgraph having problems with your code, and be sure to double check that the expected files are in the output directory. Run `subfont path/to/index.html -o path/to/outputDir`.
Expand Down

0 comments on commit 54cb99b

Please sign in to comment.