Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th December 2012, 13:14   #1  |  Link
pie
Registered User
 
pie's Avatar
 
Join Date: Sep 2012
Posts: 17
SSA/ASS font subset tool (shrink your fonts)

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:
Code:
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:
Code:
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 to work with the fonts.

Last edited by pie; 27th February 2014 at 01:41.
pie is offline   Reply With Quote
Old 14th July 2013, 10:57   #2  |  Link
pie
Registered User
 
pie's Avatar
 
Join Date: Sep 2012
Posts: 17
A new (beta) version. (link dead)

Some improvements from last time - (hopefully) more informative output, correct handling of drawing commands (ignore {\p1234...}{\p0} blocks), correct (I think) handling of hard spaces \h. It works pretty much most of the time on the stuff I've thrown at it.

Anyone ever use {\fe} commands, or have a sample that uses it?

Last edited by pie; 27th February 2014 at 01:41.
pie is offline   Reply With Quote
Old 23rd July 2013, 03:25   #3  |  Link
Plorkyeran
Registered User
 
Join Date: Mar 2008
Posts: 26
Quote:
Originally Posted by pie View Post
Anyone ever use {\fe} commands, or have a sample that uses it?
Aegisub ignores it entirely and no one has ever complained. I don't think there's any valid reason to use it anymore.
Plorkyeran is offline   Reply With Quote
Old 23rd July 2013, 04:08   #4  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Use of either \fe or \fn is needed with VSFilter when a style font does not contain certain Unicode glyphs because of limitations in GDI fallback behavior.

Example: http://www.sendspace.com/file/w3662w


Last edited by cyberbeing; 23rd July 2013 at 04:36.
cyberbeing is offline   Reply With Quote
Reply

Tags
ass, font, ssa, subset

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.