![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 24326
Join Date: Jun 2010
Device: Kobo
|
Font Scaling and TOC
Forgive me if this has already been hashed to death on this forum, but I've been goofing around with the ePubs in Sigil and this is what I've found.
Font Scaling: So far, I've had 100% success by simply removing any "font size" tags in the css stylesheet of the ePubs. All of the other formatting seems to stay intact, like bold text and italics, but the Kobo reader will now be able to scale the text size. Yeah! Most of the ePubs I've had to change had the font size set to "1em" but I've also seen some ePubs where the font size was specified "small" or "medium". From what I can tell, the relative font sizes work fine with font scaling on the Kobo reader without any need to change them. TOC: OK, so maybe this is obvious, but the Kobo reader builds it's TOC by gathering up all of the text in the body of the book that has "h#" tags around it. These are tags that indicate that the text is a heading. In addition to contributing to the TOC, these will also be formatted differently in the body of the document. H1 tags will have a really huge font, and h3 have a large but not silly font size. Most ePubs that I've seen that are set up properly seem to use h3 tags. Regardless, the Kobo reader doesn't seem to handle the h1, h2 or h3 tags any differently when it builds the TOC, so there's no point in having H1 tags for section titles and h3 tags for chapter titles. They'll all just look the same in the Kobo reader TOC. What I've generally done so far is to find an ePub that works properly and then copy the h# tag info from a chapter entry and then paste in around the chapter titles in the ePub that doesn't work. They all seem to have some extraneous attributes defined in them, and I'm not sure how much you can strip out before it ceases to be enough to look right or create a TOC in the Kobo reader. I'm hoping that a simple <h3>Chapter XX</h3> will be enough to do the trick. I've also been been inserting Sigil chapter breaks right above the chapter titles. This causes the software to split the current XML file into two, but isn't enough by itself to generate a TOC entry. I have a feeling that the Kobo reader would let you do the "Next Chapter" menu function based on this split though. I'm going to test that tonight. Anyways, I hope this helps anyone frustrated with ePubs that aren't looking quite right on their Kobo reader. Let me know if I've made a mistake or if you have any suggestions. Last edited by HamsterRage; 06-09-2010 at 10:23 AM. |
![]() |
![]() |
![]() |
#2 | ||||
Asha'man
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 335
Karma: 844
Join Date: May 2010
Location: Canada
Device: Kobo
|
You're absolutely correct about the font scaling issue, and the workaround by removing the font-size: lines in the CSS file. You might be interested in a little tool one of the forum members here created for us, which automates the process of parsing and removing those troublesome lines:
https://www.mobileread.com/forums/showthread.php?t=83209 Quote:
However, most programs (such as calibre) use the 'Heading #' tags to auto-generate this TOC. Quote:
Quote:
Quote:
Happy Tinkering! Last edited by Stinger; 06-09-2010 at 07:58 PM. Reason: typo |
||||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 179
Karma: 6328
Join Date: May 2010
Location: Melbourne, Australia
Device: Kobo eReader
|
Thanks for the tip about Sigil, I'd not heard of it before. Will check it out.
I've been doing all my ePub editing manually using my standard web development IDE, but I'd love a tool that is geared specifically towards the ePub format. |
![]() |
![]() |
![]() |
#4 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 24326
Join Date: Jun 2010
Device: Kobo
|
Sigil's a tad slow at times, for doing things like splitting XML files, but seems to be a pretty handy tool for sorting out little glitches with ePUBs.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mac OSX: Idiot-Proof Font Scaling Fix [Step-by-step] | Jelbee | Kobo Reader | 2 | 06-14-2010 12:16 PM |
PRS-500 and font scaling | dorkydood | Sony Reader | 1 | 04-10-2010 08:39 PM |
Sony font scaling : time to change? | jotas | Sony Reader | 9 | 09-07-2009 09:08 PM |
Scaling down PDF to work on BeBook | spaze | 14 | 08-09-2009 11:49 AM | |
scaling pdfs | davec67 | Sony Reader | 4 | 10-01-2006 08:07 AM |