![]() |
#1 |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
Epub: using icons mapped to characters in special font
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? |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,432
Karma: 59592133
Join Date: Jan 2007
Location: Peru
Device: KINDLE: Oasis 3, Scribe (1st), Matcha; KOBO: Libra 2, Libra Colour
|
[sigh]
Moved to the epub forum. Please take the time to become familiar with our site. Don (Moderator) |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
|
Quote:
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> 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. |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
There was lots of discussion here:
https://www.mobileread.com/forums/sho...d.php?t=222825 which dealt with different ways to include the "apple symbol" in an EPUB. Quote:
First: Font Embedding Second: SVG Third: PNG as a last resort Last edited by Tex2002ans; 11-25-2013 at 03:08 PM. |
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
You also may want to download ADE and open your ePub with it. If the icons show up in ADE, but not on an iPad you most likely made a mistake embedding com.apple.ibooks.display-options.xml. If the icons don't show up on ADE either, there's either a font or CSS problem. In that case post a small ePub sample with the font in it. |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
Quote:
(Curiously, when the file is opened and saved in Sigil, com.apple.ibooks.dispaly-options.xml is deleted from the META-INF folder.) Thanks also for pointing out Caliber's Tweak Book feature to me — I'd never noticed it before, and it certainly makes exploding and rebuilding painless. In case you want to have a look, I've made a small sample epub (17 kB). |
|
![]() |
![]() |
![]() |
#8 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
Quote:
A possible problem with my font is that the icons are mapped to the positions of other characters. For the printed edition, I took the font in which the body of the book is set, and inserted the icons in the positions of characters not used in the book (š ª « ¢ „ ¯ ² ³ µ » ¿ Ÿ ¹ ‹ ¸ Ð ¤ Ã º ‰ Þ ƒ Š Å Ý ý ß ð ). (Not sure that this was the clever thing to do.) For the epub version, I removed all the characters except the icons, because the rest of it is the font foundry's copyright. Perhaps I should map these characters to new or open positions in the font? Re: jpeg. I agree. But I'm not at all keen on using inline graphics anyway: I imagine there might be major size issues on various ereaders? |
|
![]() |
![]() |
![]() |
#10 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Note that there was a typo in DomesticExtremis's post. He suggested naming the .xml file: Code:
com.apple.ibooks.dispaly-options.xml
Code:
com.apple.ibooks.display-options.xml
|
|
![]() |
![]() |
![]() |
#12 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
Quote:
I checked, and it works in iBooks now. And in ADE, Calibre and Sigil. Is it likely to be okay on Android ereaders too? As to the file disappearing in Sigil, I'm no longer quite sure what happened. I do have the latest version installed, and I checked now, the XML file remains intact. I'll see if I can reproduce it, but it no longer really concerns me. |
|
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2013
Device: ipad
|
More on the same issue: android readers.
Thanks to DomesticExtremis pointing me to the com.apple.ibooks.display-options.xml file, the embedded fonts and everything else are rendered perfectly in iBooks. However, what can be done about the various android readers? Embedded fonts (and text colour, indents and many other things) are simply ignored on many android readers. The only reader I've tried that displays the CSS correctly, is Mantano. What to do? This book, for instance, is garbage if the embedded font isn't displayed. Should one impose on the customer saying that the book should be read with a specific ereader? Or is there a way to force the ereader app to recognize the CSS? Or can an app be made that includes the epub and a suitable reader? |
![]() |
![]() |
![]() |
#14 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
At some point you have to decide that a reader that does not support embedded fonts is not an ePub reader.
|
![]() |
![]() |
![]() |
#15 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
If it is just for you, you don't have to worry about it. If you have notions of selling it, then you want to cover as many as you can and that is not an easy challenge. Even the Kindle line is not compatible within itself!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Apple symbol and other special characters in ePub | mtrahan | ePub | 31 | 09-23-2013 07:56 AM |
Support of Special Unicode Characters in EPUB? | gawl | PocketBook | 1 | 03-24-2013 05:12 AM |
txt to epub tilde/special characters | Fuzzy Dustmite | Conversion | 1 | 04-11-2011 09:54 PM |
special characters in epub? | biltron | Introduce Yourself | 5 | 12-20-2009 03:50 PM |
Epub and special characters again | mtravellerh | Calibre | 3 | 01-04-2009 12:55 PM |