Creates font subsets for embedded fonts
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
calabash @ eef043c
css-tools @ ae50231
epub2hub-lib @ 660dc84
font-tools @ 41099fd
infrastructure
lib
schema @ 264337a
xmlcatalog
xpl
xproc-util @ d727877
xslt-util @ a8adcda
.gitmodules
README.md

README.md

epub-font-subsetter

This pipeline can be used as a frontend project to create subsets of embedded fonts from a EPUB file. It uses the font tools python libary https://github.com/fonttools/fonttools

Clone the project with: git clone https://github.com/transpect/epub-font-subsetter --recursive

Usage:

~/epub-font-subsetter $ calabash/calabash.sh xpl/epub-fontsubset.xpl epubfile=path/to/my_epub.epub Important: Choose your cwd like mentioned above. This pipeline uses an p:exec step to call a bash script, that calls the pyftsubset python script, and unfortunatly choosing the correct cwd is kind of tricky.

The pipeline creates a charset with all used characters for each embedded font and will create a subset called "myfont.otf.subset" NEW: The main output of this pipeline is an EPUB file with all subsetted fonts embedded, called subset_my_epub.epub. By using the option delete-not-used-font='true' the embedded but not used fonts (no character with this font can be found in the epub) will be deleted. $ calabash/calabash.sh xpl/epub-fontsubset.xpl epubfile=path/to/my_epub.epub delete-not-used-font=false