12-28-2010, 08:17 AM | #1 |
idiot
Posts: 91
Karma: 16
Join Date: Nov 2008
Location: Grand Cayman
Device: Sony 505, 300, and 650
|
Changing original font css in ePub
I have a 650 with the default firmware, not flashed, but have added a root folder named "fonts" and use css in Calibre to modify fonts in ePubs. That works beautifully most of the time. There are a few books where the font remains original. I know I can "Tweak Epub" in Calibre and remove the existing css, rebuild the ePub, and add my own css to get the font that I want. Problem is, I loose the other formatting in the original css. Are there specific files that I could remove or modify to just enable Calibre to change the font, and not the formatting? Mods, if you think this belongs in a different/more appropriate section, please move it. Thanks!
|
12-28-2010, 09:52 AM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
It's normally enough just to tweak the css file inside the epub rather than replace it completely. It needs to match the tags in the html files. Without seeing the existing css file and a sample piece of html it's hard to offer more specific advice. Are you able to post this?
|
Advert | |
|
12-28-2010, 10:35 AM | #3 | |
idiot
Posts: 91
Karma: 16
Join Date: Nov 2008
Location: Grand Cayman
Device: Sony 505, 300, and 650
|
Quote:
PS...I think you gave me the answer with "It needs to match the tags in the html files", but I'm unsure what that means exactly. Thanks again! Last edited by jlbfoot; 12-28-2010 at 11:49 AM. |
|
12-28-2010, 11:51 AM | #4 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I'm afraid there's no "magic bullet" that will fix all known epubs. It depends on the HTML/CSS that was in the source file you converted to epub. Having said that I don't believe there is a single epub which cannot be fixed by appropriate tweaking.
The first place I'd be looking is in the epub's internal css file. Look for occurrences of font-family:"some font name" where "some font name" is the "wrong" font name. Try tweaking to the "right" font name as specified in your Calibre extra CSS. If you're unlucky the problem may be that every single paragraph in your book's source file contained a style='font-family:"some font name";' statement with the "wrong" font name. I've often seen this when the original source is a LIT or RTF file. This is more of a pain to fix but perhaps can be done by modifying your usual Calibre extra css @font-face statements when doing the initial conversion. If you need more help with a specific book and there are copyright issues with posting here, you could send me a PM and we can find a way for me to see your source file. |
12-28-2010, 12:07 PM | #5 |
idiot
Posts: 91
Karma: 16
Join Date: Nov 2008
Location: Grand Cayman
Device: Sony 505, 300, and 650
|
You have been very helpful! At least I know where to start to look, and what to do if I find it, now.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
changing text line-height in css | wjcroft | EPUBReader | 0 | 12-15-2010 03:13 PM |
Font fail with Epub CSS | gregcd | Sony Reader | 0 | 10-28-2010 03:45 PM |
Calibre not overwriting ePub CSS font info | jswinden | Calibre | 4 | 04-06-2010 01:29 PM |
ePub - Changing Font size doesn't change page numbers | higgs | Sony Reader | 46 | 03-26-2010 02:36 PM |
Problem with epub to lrf with changing font size and line spacing | kleinbiker | Calibre | 4 | 12-17-2009 08:55 AM |