View Full Version : Unicode characters OK in text but wrong in TOC


paulpeer
01-14-2010, 04:37 PM
Because Sony, ADE and some others show nice question marks instead of Unicode characters, I've embedded Unicode fonts into the ePub. This works perfectly for the book itself, but the table of contents of the book itself, and the contents of the library, is still messed up (in Sony and ADE, but perfect in other readers)

I suppose that the CSS only affects the book itself but not the TOC. How can I fix this?

Thanks for any help!

pepak
01-14-2010, 04:51 PM
Flash LRF/RTF/TXT fonts to your Sony. There are guides in the Sony -> PRS-505 Dev Center section of these forums.

paulpeer
01-14-2010, 05:11 PM
Flash LRF/RTF/TXT fonts to your Sony. There are guides in the Sony -> PRS-505 Dev Center section of these forums.

So there is no way to fix the problem in the ePub itself? I cannot beg all my customers to flash fonts to their devices ...

Valloric
01-14-2010, 08:17 PM
So there is no way to fix the problem in the ePub itself?

Well the problem is not in the epub itself, but the Sony Reader. :)

paulpeer
01-15-2010, 02:37 AM
Well the problem is not in the epub itself, but the Sony Reader. :)

Yes, I know, Valloric. I've read the Sigil FAQ ;-) But all those FAQs give the impression that you can solve the problem by embedding fonts. I found out that you can solve the problem only in the text body, but not in the TOC. And I was wondering if it's just me who can't figure out a solution, because no FAQ mentions the fact that the TOC file cannot be infuenced by a CSS.

Jellby
01-15-2010, 05:53 AM
The CSS can only affect the (X)HTML content. Metadata and other generated content (including off-line TOC, info shown in the statusbar, page numbers...) are rendered by the reader with its own fonts and settings, I don't think you can do anything to alter them, unless the reader has some specific setting for that.

quillaja
01-15-2010, 07:37 AM
I don't think there's a way to do what you want without hacking the Sony Reader and switching it's internal built-in fonts to a font that includes the characters you're trying to display. I'm almost 100% sure that you can't make the reader's software and menus use the font you embedded into the epub file.

One solution that I use (in my Japanese epubs) is to add an English transliteration of the real title to the "title" metadata. Then you'll see, for example, ??? (Rashoumon) instead of the title you're supposed to see, 羅生門 (Rashoumon). It's not the prettiest solution, but it beats a bunch of unreadable question marks.

Valloric
01-15-2010, 10:02 AM
I've read the Sigil FAQ ;-)

I'm glad someone has. :)

And I was wondering if it's just me who can't figure out a solution, because no FAQ mentions the fact that the TOC file cannot be infuenced by a CSS.

It's completely up to the Reading System to choose how it's going to display the TOC. The specification doesn't specify whether or not the TOC should be displayed using the fonts in the epub file if the RS doesn't have the required glyphs. In fact, it doesn't talk about TOC fonts at all.

To tell you the truth, this may be a "bug" (well, an oversight) in the specification itself. This should probably be brought to the IDPF's attention. As it currently stands, an ebook producer cannot be sure that all Unicode code points will be displayed properly in the TOC even if he embedds the required fonts.

This is most definitely a bug.

paulpeer
01-15-2010, 07:17 PM
Thanks to all for your clear answers!