pie
26th December 2012, 13:14
I made a small utility to take some SSA/ASS subtitles and fonts, parse it, and create stripped down fonts containing only the characters required (font subsets).
e.g If using only one character from a font, then it will strip the font so it too only contains that one character.
Link: dead
I found this quite useful for fonts that contained CJK characters (which are often ~3MB+ each) - practically all fonts are reduced to under 100KB each, and generally I found I could get most scripts working with fonts of a combined size of 150KB or less.
Basic usage:
1. Set mkvmerge/mkvextract paths:
typochop -p "mkvmerge:/path/to/mkvmerge" "mkvextract:/path/to/mkvextract"
2. Feed it input (both fonts and subtitles):
typochop -o . video.mkv
typochop -o subsetted-fonts font-folder subs.ass
Some interesting use cases:
1. Collect all fonts for a particular series into one folder.
2. Place all subtitles for that series into another folder
typochop -o subset fonts-folder subtitles-folder
This will generate font subsets specific to each episode.
1. Do as above, but use this for the command instead:
typochop -a -o subset fonts-folder subtitles-folder
This will generate one set of fonts that will work for any episode in that series.
This tool is written in Java and uses sfntly (http://code.google.com/p/sfntly/) to work with the fonts.
e.g If using only one character from a font, then it will strip the font so it too only contains that one character.
Link: dead
I found this quite useful for fonts that contained CJK characters (which are often ~3MB+ each) - practically all fonts are reduced to under 100KB each, and generally I found I could get most scripts working with fonts of a combined size of 150KB or less.
Basic usage:
1. Set mkvmerge/mkvextract paths:
typochop -p "mkvmerge:/path/to/mkvmerge" "mkvextract:/path/to/mkvextract"
2. Feed it input (both fonts and subtitles):
typochop -o . video.mkv
typochop -o subsetted-fonts font-folder subs.ass
Some interesting use cases:
1. Collect all fonts for a particular series into one folder.
2. Place all subtitles for that series into another folder
typochop -o subset fonts-folder subtitles-folder
This will generate font subsets specific to each episode.
1. Do as above, but use this for the command instead:
typochop -a -o subset fonts-folder subtitles-folder
This will generate one set of fonts that will work for any episode in that series.
This tool is written in Java and uses sfntly (http://code.google.com/p/sfntly/) to work with the fonts.