Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transpect/epub-font-subsetter
Creates font subsets for embedded fonts
https://github.com/transpect/epub-font-subsetter
embedded-fonts epub epub2 epub3 font font-subset font-subsetter
Last synced: 24 days ago
JSON representation
Creates font subsets for embedded fonts
- Host: GitHub
- URL: https://github.com/transpect/epub-font-subsetter
- Owner: transpect
- Created: 2017-02-01T09:20:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T14:09:16.000Z (almost 6 years ago)
- Last Synced: 2024-11-13T15:26:27.881Z (3 months ago)
- Topics: embedded-fonts, epub, epub2, epub3, font, font-subset, font-subsetter
- Language: XProc
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`