Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2011, 08:49 AM   #1
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
CSS Help Please

Ok, so I have PRS+ installed on my Sony readers. Below is an example CSS file for one of the fonts that I installed. The problem is that, regardless of what I set line height to, nothing at all seems to actually change with regards to line height. I've tinkered with making it huge (just to see if it changes anything) and tiny, and nothing changes. Can anyone help?

Could it be that, in Calibre, when I convert to Epub, in "Look and Feel" I have Base Font Size set to 11.5pt and Line Height set to 13 pt? Is the CSS unable to override this? Is there any way around this without having to reconvert the thousands of books in my library?








@font-face {
font-family: "Vollkorn";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/Vollkorn-Regular.ttf);
}

@font-face {
font-family: "Vollkorn";
font-weight: bold;
font-style: normal;
src: url(res:///Data/fonts/Vollkorn-Bold.ttf);
}

@font-face {
font-family: "Vollkorn";
font-weight: normal;
font-style: italic;
src: url(res:///Data/fonts/Vollkorn-Italic.ttf);
}

@font-face {
font-family: "Vollkorn";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/Vollkorn-BoldItalic.ttf);
}

body {
font-family: "Vollkorn"; line-height: 1.9em
}

p {
line-height: 1.9em !important;
text-indent: 1.5em !important;
}

html {
font-family: Vollkorn !important;
}

.mainBody {
font-family: Vollkorn !important;
}

.calibre {
font-family: Vollkorn !important;
}
Japes is offline   Reply With Quote
Old 06-23-2011, 09:20 AM   #2
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
And, if I DO end up having to re-convert everything in my library, is there a way to select an "Input" of anything OTHER than Epub?
Japes is offline   Reply With Quote
Advert
Old 06-23-2011, 10:28 AM   #3
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Japes View Post
And, if I DO end up having to re-convert everything in my library, is there a way to select an "Input" of anything OTHER than Epub?
Yes. You can select any input for individual conversions. For bulk conversions, you don't set "the" input you select a preferred order for inputs. By default that order is set to EPUB first, followed by about 30 other formats, but you can set it to any order you want with Preferences | Behavior | Preferred Input Order.
Starson17 is offline   Reply With Quote
Old 06-23-2011, 10:34 AM   #4
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
Cool. Thanks for that. I found it and adjusted it.

Now, anyone know the answer to the first post?
Japes is offline   Reply With Quote
Old 06-23-2011, 10:42 AM   #5
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Japes View Post
Now, anyone know the answer to the first post?
Not having a Sony, I skipped over it, but for my Android reader software, I can tell them to read/use the book's CSS or override that CSS with reader supplied formatting. Is your reader software using its own CSS or CSS stored in the EPUB?
Starson17 is offline   Reply With Quote
Advert
Old 06-23-2011, 10:53 AM   #6
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
It appears to be using the reader supplied CSS for some things (like the font) but the reader supplied CSS doesn't appear to override the line height.
Japes is offline   Reply With Quote
Old 06-23-2011, 12:32 PM   #7
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
Kovid, can you chime in here?
Japes is offline   Reply With Quote
Old 06-23-2011, 12:37 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You will have a very hard time overriding css using generic selectors like that. CSS rules have rather complex priority calculations which are used to determine what will override what.
kovidgoyal is offline   Reply With Quote
Old 06-23-2011, 01:09 PM   #9
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
There has to be a way to do it, though, without re-converting everything in my library, right?

I say that, because, for example, on the new Nook, in SPITE of the Calibre settings, you can change line spacing and margins, etc. So, there has to be a way to do it. Can you please let me know?
Japes is offline   Reply With Quote
Old 06-23-2011, 01:12 PM   #10
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
Kovid, I just looked more closely at what you wrote and let me clarify something. Everything BUT the line height is apparently being overridden. The ONLY thing that isn't being overridden is line height. So the generic selectors are working on most everything. How come?
Japes is offline   Reply With Quote
Old 06-23-2011, 01:16 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because there is a higher priority selector that is applying the line height. Open your epubs and look for it.
kovidgoyal is offline   Reply With Quote
Old 06-23-2011, 01:25 PM   #12
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
So basically nothing can be done except for re-converting everything, without any line height set?
Japes is offline   Reply With Quote
Old 06-23-2011, 02:01 PM   #13
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,248
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
I could be wrong, but I'm not sure that reconverting an epub will remove line-height attributes which are already in the epub. The Calibre Look&Feel page could be used to change the value assigned to line-height but not to remove it altogether.

The guaranteed way to make sure your on-device CSS line-height is used is to use Tweak-epub to edit the css file and physically remove the line-height parts. Tedious but simple.

Edit: Oh and make sure that your Calibre conversion settings are such that line-heights are not added to epubs which didn't have them in the first place.

Last edited by jackie_w; 06-23-2011 at 02:04 PM. Reason: afterthought
jackie_w is offline   Reply With Quote
Old 06-23-2011, 02:08 PM   #14
Japes
Addict
Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.Japes ought to be getting tired of karma fortunes by now.
 
Posts: 303
Karma: 1033852
Join Date: Jun 2011
Device: Sony PRS-350,Sony PRS-950,Pocketbook 360+,B&N Nook Simple Touch Reader
I meant reconvert from the original source (Lit, Mobi, etc). But, I was hoping there was a simpler solution and, I'm convinced there is, otherwise, the Nook would be unable to alter line heights, etc, "on the go." I just know nothing about this CSS stuff (or any programming in general).
Japes is offline   Reply With Quote
Old 06-23-2011, 02:15 PM   #15
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,248
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
It's possible the Nook reading app deliberately ignores any occurrences of line-height, font-family etc in each epub so it can use the user-specified Nook settings.

Last edited by jackie_w; 06-23-2011 at 02:19 PM.
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM
CSS Help Please Japes Sony Reader 26 06-23-2011 10:40 AM
CSS help? graycyn ePub 2 06-16-2011 04:56 AM
epub CSS versus "Regular" CSS konrad ePub 4 02-18-2011 09:29 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM


All times are GMT -4. The time now is 07:27 PM.


MobileRead.com is a privately owned, operated and funded community.