View Single Post
Old 11-25-2013, 09:19 AM   #3
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
Quote:
Originally Posted by gdutoit View Post
I want to make an epub of a book that contains 30-odd small icons used throughout the text. (It's a wine guide, and the icons indicate things like the rating of the wine, eco-friendliness, good value, and so on.)

I made special font used in the print version so that the icons are simply part of the text. But in the epub version I don't think it will work that way. I tried embedding and using the font, but it didn't work on ipad.

I suppose it would work to make bitmaps of the characters, but that too will be quite a business: the book uses a different color for highly rated wines, and when the icons appear in those paragraphs, they have to be in the color of the text. And some are reversed out of a colored background. So I'll have to make a bitmap version of each in three colors, and then insert the right color jpeg in the right paragraph. All this is possible, though cumbersome (it's a 600-page book) via regex, but it would be so much simpler if the font option could work.

Any ideas?
I think the problem is iPad (or iBooks generally).
Assuming you have all the fonts setup in xhtml/css correctly for epub,
you need to add a magic incantaion to you epub to force the ipad to
use the embedded font.
You will need a file called com.apple.ibooks.display-options.xml,
containing the following:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
<platform name="*">
	<option name="specified-fonts">true</option>
	</platform>
</display_options>
It needs to be placed in the META-INF directory within the epub.

The Calibre tweak book feature is the best way to to this.
Explode the book and copy the file in place. Rebuild the book.

Calibre also contains a half decent epub viewer which means you
can check your book looks ok on devices other than iPad (most of the
market).

Last edited by DomesticExtremis; 11-26-2013 at 09:20 AM.
DomesticExtremis is offline   Reply With Quote