View Single Post
Old 08-19-2010, 08:06 AM   #20
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by ozaru View Post
Some might be relatively easy to fix with a smallish font (vowels with macrons, used throughout the text), but there are also about a dozen Japanese characters used on just 2 pages, for which the only solution I can think of is embedding a whole Japanese font file -- around 5MB. Not ideal, huh?
Subsetting, as mentioned above, is a good route, though you still have to deal with licensing issues. If it's only a dozen characters on 2 pages, why not just render them to png files and use those? All font licences will allow that. You can get the images to show up in-line with the text.

Macrons are a different issue, as most fonts have a macron, but rely on overstriking to use it. You can get an epub to overstrike by using a span with adjusted margins, eg
o<span class="o-macron">& #175;</span> {remove the space}
with
span.o-macron {
margin-left: -0.37em;
margin-right: 0.12em
}

But frankly this is very fiddly, needs to be fine-tuned for each character and breaks if the font is changed. For macrons it would be easier to embed something like SIL Gentium Basic which includes macroned vowels and has a fully open licence that allows epub embedding. It's still a hefty font at over 200k for each weight and style, but you could get away with not having to subset. (A lot of people use SIL's Charis, but personally I can't stand slab-serifs, and its massively inclusive range means each weight is 1.6MB.)

Last edited by charleski; 08-19-2010 at 08:11 AM.
charleski is offline   Reply With Quote