View Single Post
Old 01-24-2013, 11:26 AM   #22
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,238
Karma: 11710165
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by Toxaris View Post
I have thought about this for a while. I think I will start working on the following in the weekend (depends on a lot of personal stuff...):
- ability to select an ePUB
- parse XHTML to find all characters in use by a certain CSS class
- open the used fonts in the ePUB and shrink it according to the used characters for that font
- replace the fonts in the ePUB by the shrinked ones.

Don't expect it to be ready soon though, it needs quite some testing and the most difficult part will probably be the parsing of the stylesheet to find the classes where a font is defined/used. It might be that an intermediate version will be created where the styles class names have to be entered manually.

As as special service to JSWolf () I will automatically add the ligatures to the unique characters used.
Well, that's a hell of a wishlist, and it would rock, but I'd be thrilled if it could simply peruse an ePUB for all the characters used in that ePUB, even if the classes are not discovered. By which I mean: let's say I have two fonts. One for the body; one for the chapter heads. By definition, the font for the body will have more characters, in all likelihood. However, I wouldn't care, at this point in time, if I had to feed the Shrinker all the chars in the ePUB, to shrink the Chapter head font.

To have it perfect, later, would be, as I said, amazing, but right this second, what I'd love is if it could just open the ePUB and say, "VOILA!" I don't even care if I have to manually replace the fonts, that's not a big deal.

Not that I'd turn DOWN Shrinker with all the extra goodies...just thinking aloud about what I, personally, need most. I realize my needs are probably different than almost everyone else's.

OH, also: a way to direct the location of the output of the created subsetted font would be super. While I'm wish-listing.

And if I didn't say it loudly enough, before: seriously, you are fabulous.

H
Hitch is online now   Reply With Quote