Tools for making OpenType-SVG fonts
Project description
Tools for making OpenType-SVG fonts
-
addsvgadds an SVG table to a font, using SVG files provided. The font's format can be either OpenType or TrueType. -
dumpsvgsaves the contents of a font's SVG table as individual SVG files. The font's format can be either OpenType, TrueType, WOFF, or WOFF2. -
fonts2svggenerates a set of SVG glyph files from one or more fonts and hex colors for each of them. The fonts' format can be either OpenType, TrueType, WOFF, or WOFF2.
Dependencies
-
Python 3.6 or higher
-
FontTools 3.1.0 or higher
Installation instructions
-
Make sure you have Python 3.6 (or higher) installed.
-
Clone this repository.
-
cdinto the repository folder. -
Setup a virtual environment:
$ python3 -m venv venv -
Activate the environment:
$ source venv/bin/activate -
Update
pip:$ pip install -U pip -
Install
opentypesvg:$ pip install .
How to make OpenType-SVG fonts?
Step 1
Generate a set of SVG files from a series of fonts and color values.
fonts2svg -c 99ccff,ff0066,cc0066 fonts/Zebrawood-Shadow.otf fonts/Zebrawood-Fill.otf fonts/Zebrawood-Dots.otf
Step 2
Add a set of SVG files to an existing OpenType (or TrueType) font.
addsvg -s fonts/SVGs fonts/Zebrawood.otf
You can use Step 2 without doing Step 1, but there are a few things you need to be aware of when using the addsvg tool:
-
After the SVG files are saved with the authoring application (e.g. Adobe Illustrator, CorelDRAW!, Inkscape) they should be put thru a process that optimizes and cleans up the SVG code; this will slim down the file size while keeping the resulting artwork the same. For this step you can use one of these tools:
- SVG Cleaner (GUI version)
- SVG Cleaner (command line version)
- SVG Optimizer
- Scour
-
The tool requires the SVG files to be named according to the glyphs which they are meant to be associated with. For example, if the glyph in the font is named ampersand, the SVG file needs to be named
ampersand.svg. -
The tool expects the color artwork to have been designed at the same size as the glyphs in the font, usually 1000 or 2048 UPM. This means 1 point (pt) in the authoring app equals 1 unit in font coordinates.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opentypesvg-1.1.1.tar.gz.
File metadata
- Download URL: opentypesvg-1.1.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f895997a94578910f07a4683bf9a7a4821360c0860f02e66d1c5f506c9c7990
|
|
| MD5 |
6f72f148ffc8bdbce85f78272e65644f
|
|
| BLAKE2b-256 |
ada42dfd9758f92b16c3a87d99bde02f5665d2ed9ff329257d2e3d25738956d7
|
File details
Details for the file opentypesvg-1.1.1-py3-none-any.whl.
File metadata
- Download URL: opentypesvg-1.1.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
035f3655bc30597028a830569ccc0f0dece082d8dab8d6579385173d2a9c3120
|
|
| MD5 |
bd445da38c45cfc0e0c3209e956699db
|
|
| BLAKE2b-256 |
a3c4eeddb088f86fd5bd479edff5a7fe29280f281dd71a69834cd5242668797e
|