Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-13-2011, 08:25 PM   #1
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
PRS+ and embedded fonts

Hi!

Has anyone figured out a way to get PRS+ stylesheets to override embedded fonts? Or do the PRS+ stylesheets only work if you remove all embedded fonts?

P.S. I've tried using !important, but it doesn't work :-(

Thank you!
pssquirrel is offline   Reply With Quote
Old 12-13-2011, 09:56 PM   #2
Rizla
Member Retired
Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.Rizla ought to be getting tired of karma fortunes by now.
 
Posts: 3,183
Karma: 11721895
Join Date: Nov 2010
Device: Nook STR (rooted) & Sony T2
If you convert to mobi it will strip the embedded fonts, then you can convert to epub. mobi has it uses.
Rizla is offline   Reply With Quote
Old 12-13-2011, 10:26 PM   #3
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
Thanks for the tip, but I actually don't want to strip the embedded fonts.

The T1 won't render consistent italics/bold unless the fonts are embedded or you use the Original font. Thanks to seabee and jackie_w, I'm able to embed resident fonts per this thread (see posts #22, 29 and 32).

But if I embed resident fonts for the T1, the PRS+ stylesheets don't work on the 350.

So I'm trying to figure out if there's a way to override embedded fonts using CSS alone without actually removing the embedded fonts. Is this even possible?
pssquirrel is offline   Reply With Quote
Old 12-14-2011, 06:18 AM   #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
Quote:
Originally Posted by pssquirrel View Post
Thanks for the tip, but I actually don't want to strip the embedded fonts.

The T1 won't render consistent italics/bold unless the fonts are embedded or you use the Original font. Thanks to seabee and jackie_w, I'm able to embed resident fonts per this thread (see posts #22, 29 and 32).

But if I embed resident fonts for the T1, the PRS+ stylesheets don't work on the 350.

So I'm trying to figure out if there's a way to override embedded fonts using CSS alone without actually removing the embedded fonts. Is this even possible?
I've just tried this out on my PRS650 and PRST1. I didn't expect it to work but it does work for me.

When you say 'embed resident fonts' I assume you mean you have added @font-faces for one of the 6 T1 special fonts to the epub CSS file but not copied (i.e. embedded) the physical font files (.otf/.ttf)

I created an epub with the following added to the epub css file (as per referenced post #32)
Code:
@font-face {font-family: serif; font-weight: normal; font-style: normal;  src: url(res:///ebook/fonts/AmasisMTW1G.otf)}
@font-face {font-family: serif; font-weight: normal; font-style: italic;  src: url(res:///ebook/fonts/AmasisMTW1G-Italic.otf);}
@font-face {font-family: serif; font-weight: bold; font-style: normal;  src: url(res:///ebook/fonts/AmasisMTW1G-Bold.otf);}
@font-face {font-family: serif; font-weight: bold; font-style: italic;  src: url(res:///ebook/fonts/AmasisMTW1G-BoldItalic.otf);}
I then copied the same epub to both the 650 and T1.

As expected the T1 displays correctly with Amasis.
The same epub displays correctly as Charis on the 650.

My PRS+ selected css file is set up for Charis as follows:
Code:
@font-face { font-family: serif; font-weight: normal; font-style: normal;  src: url(res:///Data/fonts/CharisSILR.ttf);}
@font-face { font-family: serif; font-weight: normal; font-style: italic;  src: url(res:///Data/fonts/CharisSILI.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: normal;  src: url(res:///Data/fonts/CharisSILB.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: italic;  src: url(res:///Data/fonts/CharisSILBI.ttf);}
body {font-family: serif; line-height: 1.2}
body, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.book {font-size: 0.85em !important;}

Does any of this help you track down your problem?

Last edited by jackie_w; 12-14-2011 at 06:26 AM.
jackie_w is offline   Reply With Quote
Old 12-14-2011, 10:42 AM   #5
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rizla View Post
If you convert to mobi it will strip the embedded fonts, then you can convert to epub. mobi has it uses.
That is a really bad idea for just removing embedded fonts. You don't want to do extra conversions when not needed.
JSWolf is offline   Reply With Quote
Old 12-14-2011, 11:03 AM   #6
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
Quote:
Originally Posted by jackie_w View Post
I've just tried this out on my PRS650 and PRST1. I didn't expect it to work but it does work for me.

When you say 'embed resident fonts' I assume you mean you have added @font-faces for one of the 6 T1 special fonts to the epub CSS file but not copied (i.e. embedded) the physical font files (.otf/.ttf)
Yes!

Quote:
I created an epub with the following... Does any of this help you track down your problem?
Okay, I am clearly losing my marbles.

I tried your code, and it worked! Yippee!!!!!

Then, on a whim, I tried the same ebook that wasn't working last night and ... what?!?!? ... it worked!

I have no idea why it was not working last night as I didn't change anything.

But clearly, you can override embedded fonts using just CSS without having to strip the fonts (or at least, embedded resident fonts, maybe not embedded physical font files). Yippeee!!!!!

Once again, I am in your debt jackie_w.

pssquirrel is offline   Reply With Quote
Old 12-14-2011, 01:19 PM   #7
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
You're welcome.

By the way, I'm drawn to your avatar. I had 5 squirrels in my garden this afternoon, shoulder-charging each other to get at the nuts on the patio. They're costing me a small fortune
jackie_w is offline   Reply With Quote
Old 12-14-2011, 08:03 PM   #8
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
We squirrels need our nuts :-)

Thanks again, by the way. Words cannot express how jumping-up-and-down-for-joy I am to have consistent bold/italics on my T1 *and* the ability to use PRS+ style sheets on my 350. I'm in heaven!
pssquirrel is offline   Reply With Quote
Old 12-16-2011, 04:44 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Rizla View Post
If you convert to mobi it will strip the embedded fonts, then you can convert to epub. mobi has it uses.
Converting ePub to ePub will do, or for that matter most any conversion as long as you set it to remove embedded fonts during conversion (preferences - common options - Look & field - Filter Style Information).

Quote:
Originally Posted by pssquirrel View Post
Okay, I am clearly losing my marbles.

Then, on a whim, I tried the same ebook that wasn't working last night and ... what?!?!? ... it worked!
You're not losing your marbles. In order for any css changes to take effect you have to open a different book then go back and reopen the book you wanted to see the changes in.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded fonts dicknskip Sigil 27 12-01-2011 09:24 AM
Embedded fonts? Greenmantle Kobo Reader 66 07-27-2011 08:20 PM
Embedded fonts, Calibre, and choice of fonts AlexBell ePub 8 05-30-2010 06:00 AM
iPad Embedded Fonts JSWolf Apple Devices 24 04-26-2010 02:41 PM
PRS-500 and Connect software vs. PDF with embedded fonts olegk Sony Reader 7 11-03-2007 08:49 PM


All times are GMT -4. The time now is 09:20 PM.


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