05-12-2011, 03:01 AM | #1 |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
CSS files and reading software
After scouring the forum, it seems to me that the only reading software that "understands" CSS files in full is tselling's "Hacked Adobeviewer" (though things might improve with pkbo's further versions of Coolreader). However if I got it right this hack does not work with the Pro models.
Is this correct, or are there "things" which can be done to use CSS with any of the current readers? My problem is that I'd like to be able to rescale images up. I've tried by using the option "width: 100%" in the image class, but it only works in Adobeviewer (but there I am stuck with the inability to change fonts). |
05-12-2011, 03:28 AM | #2 |
Enthusiast
Posts: 41
Karma: 124
Join Date: Oct 2010
Device: PocketBook 903
|
.....
Last edited by darknessEC; 05-12-2011 at 03:04 PM. Reason: I have discovered that I am not so goot at English |
Advert | |
|
05-12-2011, 03:28 AM | #3 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
In my mind, Adobeviewer is the best ePub-reader on the Pro Pocketbooks although it is not perfect.
You can use another font with the Adobeviewer if you include this font right into the ePub/css-file. Maybe you want to have a look at this book and its css-file https://www.mobileread.com/forums/showthread.php?t=48377 where Zelda played a lot with the possibilities of css, amongst them using another font. |
05-12-2011, 11:44 AM | #4 | ||
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
Quote:
|
||
05-12-2011, 03:18 PM | #5 | |
Grand Sorcerer
Posts: 11,732
Karma: 128354696
Join Date: May 2009
Location: 26 kly from Sgr A*
Device: T100TA,PW2,PRS-T1,KT,FireHD 8.9,K2, PB360,BeBook One,Axim51v,TC1000
|
Quote:
Some people see nothing wrong in spending time reformatting and recompiling ebook files before reading them. Others, like me, seem to think that duty properly belongs to the reader app, at render time, not the consumer. Which is why the hacked adobeviewer for 3xx came about. At this point, since you'd have to strip DRM anyway, I suspect you might as well go with coolreader and its custom *global* css features. At least that way you don't have to decompile and recompile each epub. But then, I'm lazy and would rather spend my ebook time reading. |
|
Advert | |
|
05-13-2011, 02:46 AM | #6 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
But I do not follow when you talk about "decompile and recompile": I simply opened the file in Sigil, and edited the "width: auto" line to "width: 100%". And saved. Presumably Sigil then does all in the background? |
|
05-13-2011, 03:03 AM | #7 |
Wizard
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Yes. EPUB files are compressed zip archives. Sigil does the unzipping/zipping for you when loading/saving. It's a very nice program.
|
05-13-2011, 07:49 AM | #8 | |
Grand Sorcerer
Posts: 11,732
Karma: 128354696
Join Date: May 2009
Location: 26 kly from Sgr A*
Device: T100TA,PW2,PRS-T1,KT,FireHD 8.9,K2, PB360,BeBook One,Axim51v,TC1000
|
Quote:
Just a matter of philosophy. I am glad to see Sigil solved your problem painlessly (which is what matters) and you have a workaround until the graphics display option is enabled on Coolreader which, given the speed with which this port has matured, probably won't be long. |
|
05-13-2011, 08:15 AM | #9 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
I'd like to learn more, but if and when I choose, whereas here I am simply pressed by the fact that I'd like to be able to see the pie charts - I haven't yet tackle the font issue, which I'll overcome only if there is some monkey-proof one line fix - if it works, I'll report back! |
|
05-13-2011, 06:14 PM | #10 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
But to backtrack a little... reading epubs in the font-face of your choice, on a reader which uses an Adobe renderer requires only 2 things:
There are 3 ways an epub with customized fonts can be prepared:
When you get round to trying it, there is no reason why you can't use option 3 on your reader, for non-DRM epubs. Just ask if you need help |
|
05-14-2011, 02:35 AM | #11 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
- opened the epub in Sigil; - use the "show both display and code" option, and identified "calibre 3" as the "class" for images (not too sure what a class mean, but I think I get the genral idea) - clicked on the .css file in calibre and changed "width: auto" to "width: 75%". - Opened Zelda's "Three men in a boat" and looked at the css file; - cut and past from it the first bits of codes which mentioned fonts: Code:
@font-face { font-family: "Fontin"; font-weight: normal; font-style: normal; src: url(../Fonts/Fontin-Regular.ttf); } @font-face { font-family: "Fontin"; font-weight: bold; font-style: normal; src: url(../Fonts/Fontin-Bold.ttf); } @font-face { font-family: "Fontin"; font-weight: normal; font-style: italic; src: url(../Fonts/Fontin-Italic.ttf); } body { font-family: "Fontin", serif; } Code:
@font-face { font-family: "LexiaDaMa"; font-weight: bold; font-style: italic; src: url(../Fonts/LexiaDaMa-BoldItalic.ttf); } Having said this, it took me much longer than I was hoping, so if there were a way to add these various bits of code as "tweaks" in Calibre once and for all, it would make my life soo much easier, letting me get on with reading (and perhaps get to know a bit more about epub in my non reading spare time ) |
|
05-14-2011, 02:55 AM | #12 | |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
Quote:
I'm glad you figured it out so quickly and I'm glad it worked! But will it really take that much time? You can copy the font-face part from your new css style (with the LexiaDaMa font) into a seperate txt file. Then if you want to change the font in your next book, open the txt-file and copy it, open sigil, paste into the css-file and then add the fonts to the fonts folder and save. I guess it will take you less than five minutes. It's really nice to read with the one's favourite fonts! |
|
05-14-2011, 03:36 AM | #13 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
Yes, you are right that it wouldn't take me that long to repeat this. On the other hand, I do not know if there may be other bits of the style that call the font at other places. More importantly, it would be much better if the tweak on the image files could be done automatically upn Calibre conversion, as this way you do not have to go hunt for the files. Above all, though, with many books, 5 mins per book can add up to hours, and if I can avoid that, it is no bad thing |
|
05-14-2011, 07:39 AM | #14 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@paola,
You have successfully gone the embedded fonts route (item 1 in my list above). It works great, the possible drawback is that every single epub contains the LexiaDaMa .ttf files, which could be a lot of disk space if you've got thousands of books on the reader. You've already done the brainwork necessary for the "middle ground" option (item 3). The only differences are:
|
05-14-2011, 12:28 PM | #15 | |
Wizard
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Quote:
/mnt/ext1/system/fonts is standard. So I would guess that the resultant epub would be "locked" to the PB readers. Is there no way to ask for a font without needing to specify the exact path, say through some kind of system default path? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS files not being used?? | spaze | Sigil | 12 | 03-03-2011 04:26 PM |
Multiple CSS Files | jjm6383 | Sigil | 2 | 06-28-2010 05:44 PM |
Sigil and CSS files | crutledge | Sigil | 6 | 05-20-2010 09:02 AM |
Help! Newbie having problems converting HTML/CSS files | jackie_w | Calibre | 6 | 09-14-2009 04:53 PM |
What library management software/sync software to use with 505? (No DRM files) | techie_007 | Sony Reader | 4 | 02-21-2009 08:22 AM |