https://github.com/arrowtype/drawbot--loop-through-font-glyphs
DrawBot scripts to loop through all glyphs of a built font binary (TTF or OTF), e.g. for use in proofing & SVG icon font conversion
https://github.com/arrowtype/drawbot--loop-through-font-glyphs
Last synced: 11 months ago
JSON representation
DrawBot scripts to loop through all glyphs of a built font binary (TTF or OTF), e.g. for use in proofing & SVG icon font conversion
- Host: GitHub
- URL: https://github.com/arrowtype/drawbot--loop-through-font-glyphs
- Owner: arrowtype
- License: mit
- Created: 2021-01-22T17:52:48.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-24T23:41:49.000Z (about 5 years ago)
- Last Synced: 2025-04-03T19:39:24.220Z (12 months ago)
- Language: Python
- Size: 11.2 MB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Looping through font binaries in DrawBot
A quick exploration of looping through all glyphs in a font binary (TTF or OTF). Probably a WIP.
Useful in cases such as:
- Exporting an icon font to SVGs or PNGs, etc
- Making a PDF to proofing every glyph in a font
## Usage
### Set up the environment
To build, set up the virtual environment
```bash
virtualenv -p python3 venv
```
Then activate it:
```bash
source venv/bin/activate
```
Then install requirements:
```bash
pip install -U -r requirements.txt
```
### Run the scripts
Run the desired DrawBot script in a terminal:
```bash
python source/export-ttf-to-svg.py
```
```bash
python source/export-ttf-chars-to-svg.py # warning: this one can take a while for a large font!
```
To alter the font, replace `source/RecursiveMonoCslSt-Med.ttf` with any ttf or otf font, then update the drawbot scripts to point to that new file path.