|
|
#166 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18
|
Is it possible to specify the font in the CSS stylesheet so it over rides what's embedded in the books? |
|
|
|
|
|
#167 |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,319
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Since the expansion of the viewer preferences many things that previously required style sheet changes can be changed in the preferences.
When the viewer is open click on the viewer preferences icon in the toolbar and change the font to anything you want.
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
|
|
|
|
Enthusiast
|
|
|
|
#168 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,513
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This will not override fonts specified in the book. For that you should do an conversion and use filter css to remove the fonts.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#169 |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,319
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Thanks for the clarification, when I tested I forgot I have already removed any fonts from 98% of my books.
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
|
|
|
|
|
#170 | |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2013
Device: Kindle
|
I tried copying and pasting this code into the Calibre stylesheet and got a completely white page with no printing on it.
Whatever I try in background-color:rgb(0,0,0); doesn't change the background colour. Changing the color changes the print color. What is going wrong? I am a complete greenhorn with regard to this programming. I am running Windows 7 on a Acer laptop. Please help. Quote:
|
|
|
|
|
|
|
#171 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 5502
Join Date: Oct 2012
Device: none
|
Is there any way I can set the margins in terms of percentage of the window? For example, I like to read with the viewer covering about half the screen while I do something else, and my margin settings of 400px reduces the text on every line to a single word! If instead I could set the margin as a percentage, it would be greatly helpful. Here's the code, taken from some other contributor in this thread:
Quote:
|
|
|
|
|
|
|
#172 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Mar 2013
Device: calibre
|
Help!! Calibre overrides my CSS stylesheet
![]() This is a line from my css, trying to make code look good: Code:
.programlisting {
font-family: "Anonymous Pro";
}
And this is what is shows: Code:
font-family: monospace; .programlisting - monospace stylesheet.css:204 .programlisting - 'Anonymous Pro' user stylesheet pre, xmp, plaintext, listing - monospace user agent stylesheet body - georgia ![]() Any help appreciated. |
|
|
|
|
|
#173 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,513
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's a stylesheet in your book, not one generated by calibre. You have to use !important to override the book's styles in your custom stylesheet or use filter css and do a conversion to remove the css from the book.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#174 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
|
Quote:
|
|
|
|
|
|
|
#175 | |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,319
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Quote:
First you have to grab the background image from the web page (http://epubzengarden.com/images/bg1.jpg) and save it to your computer. Right click the link and select Save link as if using Firefox or Save target as if using Internet Explorer. Save this file in a location on your hard drive, it doesn't matter where but you will need to obtain the file path to this image. 1. Now open any book in calibre's viewer and then open preferences. Now go to he User style tab (see attached) and paste the following. Replace the green colored path below with your actual path on your machine to the image. Code:
body { background-image:url("file:///C:/Dropbox/Calibre Portable/Calibre Settings/resources/images/bg1.jpg") !important;
}
Red: 68 Green: 51 Blue: 0 Click OK Then click OK again. Your book in calibre viewer should have the same background and text color as the example you cited. If it doesn't then review the path you set in step 1 above, ensure all slashes are in the same direction as I indicated and that it does point to the file's exact location on your machine. 3. Now that the background and font color are set open preferences again and go to the Theming tab (see attached). Click the Save button and enter a title for this theme. Click OK then OK again. Now you have saved this theme and if you decide to experiment further you can always go back to this theme via the Load button.
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. Last edited by DoctorOhh; 04-14-2013 at 02:08 AM. |
|
|
|
|
|
|
#176 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
|
Incredible. Thanks for making it so easy. I've applied them in 5secs...but it seems that I can't override text alignment setting of the file to justify even with "text-align:justify !important;" line. Do you have a solution for this, too?
I appreciate your help.
|
|
|
|
|
|
#177 | |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,319
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Quote:
I prefer left justified for my 7 inch tablet, but I can see using full justification on a full monitor. I tried what you tried and it worked on one book of about 12 that I tried it on. Personally since I prefer left justify I set this when I convert the book to my specs. There is a setting under the conversion options on the Look & Feel tab where you can set your alignment preference during conversion, see attached. Alternatively instead of converting the book if it is epub I suppose you could:
Good Luck.
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
|
|
|
|
|
|
#178 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
|
Quote:
Cheers |
|
|
|
|
|
|
#179 | |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,319
Karma: 11288999
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Quote:
Hopefully someone with more knowledge will have insight into how to adjust the viewer's css.
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
|
|
|
|
|
|
#180 |
|
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Feb 2008
Device: Cybook, Palm Z72
|
It was really hard to give up the Mobipocket reader. It was so easy to use and I loved the column formats.
Well. . . .It's now gone from my computer. I finally figured out how to get books to be three columns and cover my whole screen. Use my favorite font (Constantia) and even a soft buff background. So, I have my Cybook (Opus) which fits in my apron pocket or my bag. I have Calibre to let me keep things organized and read on the PC. My question is how can I get 3 columns/pages justified left Last edited by Gladtobemom; 05-19-2013 at 12:33 PM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 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 |
| User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 07:44 AM |
| ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 04:03 AM |
| Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 09:59 AM |