Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2011, 07:35 PM   #1
sonyreaderfan
Groupie
sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.
 
Posts: 182
Karma: 203167
Join Date: Apr 2011
Device: Sony Reader Prs 950, iPad
epubs that resist custom font changes

I used PRS+ to add custom fonts. The directions and the custom css are exactly as described in a write-up by Anamardoll.

http://www.anamardoll.com/2011/06/er...tion-with.html

The font changes take place for most epubs and work great. However, I came across some epubs that are resistant to font changes. I've attached one below (grimms_nofontchange.epub). The font displayed is the default Sony Reader font.

The epub that is resistant to font changes is the Grimm's Stories from Sony's free Google books. In fact, any ebooks from Google's free classic ebooks are resistant to font change. I then downloaded another Grimm's Story from Gutenberg Project, and that version allows font changes (grimms_fontchanges.epub).

Does anyone know how to make the resistant epub take on font changes, either by modifying the custom css used by PRS+, or converting the epub through Calibre?

Also, reasons why the epub is resistant to font changes?

Thanks. Help much appreciated.

P.S. I know an easy answer is just to get the Gutenberg version for the classics but I've came across some commercial epubs that are resistant to font changes. My plan is to fix them either through changing css file, or converting the commercial epubs through Calibre (after de-drming them.)

P.P.S: Am I allowed to attach drm-free samples of commercial work? An commercial epub that resist font change is The Odyssey, translated by Robert Fagles. The free sample epub I've downloaded is from Barnes and Noble.
http://www.barnesandnoble.com/w/odys...obert%2bfagles If you want to download the sample and test for yourself.

Because Sony ebookstores and Kobo bookstores don't have free sample epubs, I download the sample epub from Barnes and Noble to see how it'll look on the Sony Reader. Since it's epub format, it approximates the purchased Sony or Kobo version.

CSS details:
This is the custom css I used.

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

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

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

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

body {
font-family: "Charis";
}


@font-face {
font-family: "Charis";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/Charis-Regular.ttf);
}
Attached Files
File Type: epub Grimms-fontschange.epub (1.57 MB, 128 views)
File Type: epub Grimms_nofontchange.epub (1.40 MB, 126 views)

Last edited by sonyreaderfan; 08-16-2011 at 11:53 PM.
sonyreaderfan is offline   Reply With Quote
Old 08-16-2011, 08:33 PM   #2
quisvir
Addict
quisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animalsquisvir is kind to children and small, furry animals
 
quisvir's Avatar
 
Posts: 238
Karma: 6875
Join Date: Feb 2009
Location: Netherlands
Device: Kindle PW2
Try this change:

Code:
body {
font-family: "Charis" !important;
}
quisvir is offline   Reply With Quote
Advert
Old 08-16-2011, 08:41 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: 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
The code inside the Google version of Grimm is awful.
JSWolf is offline   Reply With Quote
Old 08-16-2011, 11:17 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
@sonyreaderfan,

Your misbehaving epub works OK on my Sony, so if quisvir's suggestion doesn't work you could also try changing the font-family bit of every @font-face statement in the Sony CSS file like so:
Code:
@font-face {
font-family: "Charis", serif;
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/Charis-Regular.ttf);
}
and similarly, just for belt & braces, also change the body statement like this:
Code:
body {
font-family: "Charis", serif;
}
I'm not sure that a Calibre conversion would sort out your font problem but it may sort out the image size problem in this particular epub.
jackie_w is offline   Reply With Quote
Old 08-17-2011, 12:22 AM   #5
sonyreaderfan
Groupie
sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.sonyreaderfan ought to be getting tired of karma fortunes by now.
 
Posts: 182
Karma: 203167
Join Date: Apr 2011
Device: Sony Reader Prs 950, iPad
Quote:
Originally Posted by jackie_w View Post
@sonyreaderfan,

Your misbehaving epub works OK on my Sony, so if quisvir's suggestion doesn't work you could also try changing the font-family bit of every @font-face statement in the Sony CSS file like so:
Code:
@font-face {
font-family: "Charis", serif;
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/Charis-Regular.ttf);
}
and similarly, just for belt & braces, also change the body statement like this:
Code:
body {
font-family: "Charis", serif;
}
I'm not sure that a Calibre conversion would sort out your font problem but it may sort out the image size problem in this particular epub.
Thanks! The bit about adding "serif" to the font family made the font changes work. The font changes works now for the Google version of Grimms and the sample version of The Odyssey. The moral of the story is to be specific in coding the css.
sonyreaderfan is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why the font won't change in certain epubs ficbot Kobo Reader 68 10-14-2020 01:54 PM
Hacks Best custom font? robollama Amazon Kindle 7 05-01-2011 07:33 PM
ePubs and Google Font API Justin Rotkowitz ePub 1 03-29-2011 11:33 AM
Custom Font Hacking Hrant Kindle Developer's Corner 5 07-26-2010 05:46 PM
Font selection for epubs? RootlessAgrarian OpenInkpot 4 01-24-2010 12:16 AM


All times are GMT -4. The time now is 01:10 AM.


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