Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2017, 01:31 PM   #1
lual
UI Designer
lual doesn't litterlual doesn't litter
 
lual's Avatar
 
Posts: 5
Karma: 110
Join Date: May 2017
Location: Caracas, Venezuela
Device: Generic laptop
Exclamation Problem with custom CSS for reader

Hi guys, I've been having trouble to customize body text styles in the e-book reader:

What I'm trying to accomplish
- Set the styles for the body text (paragraphs and related).

What I've tried so far
- Change the serif family in the font preferences: it doesn't change it at all.
- Use custom CSS for p elements: it only allows me to change the color but it doesn't allow me to change the font, nor the line height. It even doesn't recognize the CSS examples provided by the app itself.

Environment
- Linux Mint 17.3
- Calibre 1.25

Any thoughts on how to solve this issue?

Thanks in advance
lual is offline   Reply With Quote
Old 05-17-2017, 01:41 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by lual View Post
Hi guys, I've been having trouble to customize body text styles in the e-book reader:

What I'm trying to accomplish
- Set the styles for the body text (paragraphs and related).

What I've tried so far
- Change the serif family in the font preferences: it doesn't change it at all.
- Use custom CSS for p elements: it only allows me to change the color but it doesn't allow me to change the font, nor the line height. It even doesn't recognize the CSS examples provided by the app itself.

Environment
- Linux Mint 17.3
- Calibre 1.25

Any thoughts on how to solve this issue?

Thanks in advance
Wow, that is a really old Calibre version. I assume there is a reason for not being more current? Calibre 3 is in Betas

Assuming your CSS works in other ways

This is a common DEVICE issue. The ignore certain CSS styling that they provide user controls for.
Some devices have a "use Publishers Styles" setting

I
theducks is offline   Reply With Quote
Advert
Old 05-17-2017, 01:46 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Update your Calibre to a new version and try again. Mange fixes/changes have been made and maybe your problem isn't a problem. It's not worth our time tying to help support such an old version since there is no reason not to update.
JSWolf is offline   Reply With Quote
Old 05-17-2017, 04:15 PM   #4
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
... also showing your info details as 'Reader:Whatever' is singularly unhelpful for someone to assist with CSS issues.

Be more specific how you're planning to read the book and in what ebook format. Every branded device and/or reading app I've ever used is different in some way to the rest - especially when it comes to fonts.
jackie_w is offline   Reply With Quote
Old 05-17-2017, 06:39 PM   #5
lual
UI Designer
lual doesn't litterlual doesn't litter
 
lual's Avatar
 
Posts: 5
Karma: 110
Join Date: May 2017
Location: Caracas, Venezuela
Device: Generic laptop
Thank guys! I guess I'm using a version from the "trusted channels" (they tend to be older than current versions), so I'm going to download the newest version and I'll keep you posted.

Regarding "reader: whatever", I'm using it on desktop, so I'm not sure what is the proper way to refer to this type of device (I guess this field is meant for something like Kindle or iPad xD).

Thanks again for the help, hopefully downloading the new version will work
lual is offline   Reply With Quote
Advert
Old 05-17-2017, 06:42 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Calibres viewer is very forgiving.

But even it has overides. Inside the viewer, use the configuration icon to review all your option choices.
theducks is offline   Reply With Quote
Old 05-17-2017, 07:10 PM   #7
lual
UI Designer
lual doesn't litterlual doesn't litter
 
lual's Avatar
 
Posts: 5
Karma: 110
Join Date: May 2017
Location: Caracas, Venezuela
Device: Generic laptop
Now I'm using version 2.85.1 and the problem is still there. For some reason it doesn't allow to change the paragraph font (not even with the built-in options under "Preferences" :/).

Any thoughts?
lual is offline   Reply With Quote
Old 05-17-2017, 09:09 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by lual View Post
Now I'm using version 2.85.1 and the problem is still there. For some reason it doesn't allow to change the paragraph font (not even with the built-in options under "Preferences" :/).

Any thoughts?
Nope!
You need to look at the code and figure out what styles affect what you see
Code:
<p> <span class="foo2">Ugly</span></p>
changing the <p> will not override the span.foo style
theducks is offline   Reply With Quote
Old 05-17-2017, 10:50 PM   #9
lual
UI Designer
lual doesn't litterlual doesn't litter
 
lual's Avatar
 
Posts: 5
Karma: 110
Join Date: May 2017
Location: Caracas, Venezuela
Device: Generic laptop
Quote:
You need to look at the code and figure out what styles affect what you see
I understand the specificity thing, however, I haven't found documentation about the specific classes/ids that are used within the ebook's source HTML, nor anything about how to access the source using Calibre or other app (when I googled it I only found tutorials on how to go from HTML to .epub but not the other way around).

Do you know a way of seeing the source? and on the other hand, should I report it like a bug (since it doesn't even work with the default GUI as displayed in the image)?

Moderator Notice
Please read forum rules on Image size (600x600 max). Oversize image deleted. shrink and repost

Last edited by theducks; 05-17-2017 at 10:58 PM. Reason: oversize image deleted
lual is offline   Reply With Quote
Old 05-17-2017, 11:15 PM   #10
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The GUI options provide a fallback font, which is used when the document being viewed does not specify its own fonts. You want those to work you need to remove the fonts specified int he document itself, which you do by using the relevant options in the Look & Feel section of the conversion dialog, or using the calibre Edit Book tool.
kovidgoyal is offline   Reply With Quote
Old 05-17-2017, 11:42 PM   #11
lual
UI Designer
lual doesn't litterlual doesn't litter
 
lual's Avatar
 
Posts: 5
Karma: 110
Join Date: May 2017
Location: Caracas, Venezuela
Device: Generic laptop
Quote:
The GUI options provide a fallback font, which is used when the document being viewed does not specify its own fonts. You want those to work you need to remove the fonts specified int he document itself, which you do by using the relevant options in the Look & Feel section of the conversion dialog, or using the calibre Edit Book tool.
Wow, I didn't know Calibre is this powerful!

@kovidgoyal Thanks for introducing me to these functions and also thanks to @theducks, @JSWolf, and @jackie_w for your valuable input
lual is offline   Reply With Quote
Old 05-18-2017, 09:46 AM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by lual View Post
Wow, I didn't know Calibre is this powerful!

@kovidgoyal Thanks for introducing me to these functions and also thanks to @theducks, @JSWolf, and @jackie_w for your valuable input
Welcome to Calibre.
Where many users like myself, barely scrape the surface of ALL the features and power Kovid has built into it.
This forum is the most likely place to find someone who uses the feature YOU need help with. All you need to do after posting, is to wait for the right person to drop by and to clarify your post when we miss on what you need
theducks is offline   Reply With Quote
Reply

Tags
css changes, custom font, ebook reader


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Chapterhead style --- possible in CSS? GrannyGrump ePub 10 09-18-2013 09:58 PM
PRS-950 A little web too to generate custom CSS gsgleason Sony Reader 0 12-18-2011 06:51 PM
Custom CSS Japes Conversion 5 07-09-2011 08:15 PM
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM


All times are GMT -4. The time now is 01:49 PM.


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