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-20-2012, 11:15 PM   #121
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Quote:
Originally Posted by jackie_w View Post
I just tried this. It works very well

Create a /css directory in the root of int.mem and place my.css file (containing all the @font-faces etc) in there. Then insert your suggestion of the single line
Code:
@import url(res:///ebook/fonts/../../mnt/sdcard/css/my.css);
at the top of each epub css file then all customised font-family, font-size, line-height etc seems to display just fine.
Quote:
Originally Posted by snarkophilus View Post
The next thing I'm wondering if how hard it would be to automate adding that @import to every epub in my Calibre library. Some epubs have multiple CSS files, so you can't just blindly add the @import to every CSS you see.
Hello,

Did you guys ever figure out a way to add the @import line via Calibre? (I found Simon's query in the Calibre forum, but it didn't seem to have resulted in a solution.)

I tried adding it to the "Look & Feel: Extra CSS" box, but it didn't seem to work. I'm not sure if I'm doing something wrong or if it's just not possible.

(I am asking this for a friend with a T1 who likes the idea of custom fonts but is afraid to root or install Morkl's reader app. Thus the external stylesheet solution.)

Thanks for any assistance!
Jane12 is offline   Reply With Quote
Old 08-20-2012, 11:36 PM   #122
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
I'm afraid to say that since I've been using Morkl's reader app I haven't had the need to look at automating adding the @import through Calibre.

When you tried adding the @import to the "Extra CSS" box, did that actually CSS make it out to the epub?

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 08-20-2012, 11:56 PM   #123
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Nope. When I added the @import line to the Extra CSS box and ran the conversion, I couldn't find the @import line anywhere in the epub. Checked both the new css stylesheet and the html files.

Last edited by Jane12; 08-21-2012 at 09:42 AM.
Jane12 is offline   Reply With Quote
Old 08-21-2012, 12:43 AM   #124
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by Jane12 View Post
Nope. When I added the @import line to the Extra CSS box and ran the conversion, I couldn't find the @import line anywhere in the epub. Checked both the new css stylesheet and the html files.

I'm attaching a screenshot of the Calibre screen. Did I do something wrong, or does it just not work?
Maybe try adding any old CSS in that box? Eg:
Code:
p.test {
   font-size: 1em;
}
just to see if it shows up in anywhere?

I'm not at home, so can't try it.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 08-21-2012, 01:54 AM   #125
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Thanks Simon. I tried adding plain CSS and it showed up in the css stylesheet. I added @font-face and it showed up in the page stylesheet. But when I add @import, it doesn't show up anywhere.

Perhaps it's not possible to do this with Calibre after all
Jane12 is offline   Reply With Quote
Old 08-21-2012, 02:37 AM   #126
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Digging a bit further the @import thing looks like a known problem that won't be fixed - see the "won't fix" status.

I'm not sure what other options you have, short of adding all the font-family stuff to the "Extra CSS" but then that locks you into a fixed font (unless you play funny games with renaming the font files on the device if you want to change font).

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 08-21-2012, 09:41 AM   #127
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Thanks much Simon! You've been very helpful. Now that I know it won't work (as opposed to user-error), I'll stop messing with Calibre.

best, jane
Jane12 is offline   Reply With Quote
Old 09-12-2012, 08:28 PM   #128
Frescard
Enthusiast
Frescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with others
 
Posts: 29
Karma: 2910
Join Date: Aug 2012
Location: Montreal, Canada
Device: Sony PRS-T1
I'm having trouble activating custom CSS via the modified reader.
I went through the Wiki pages, and jackie's detailed post, but my T1 doesn't seem to find the referenced fonts.
If I use the definitions below, the fonts in the drop-down selection all look the same!
(Once I remove the styles section from reader.xml everything looks ok again.)

The reader.xml itself seems to be interpreted fine, as the other settings are applied correctly (like the refresh frequency and the clock display), so I'm afraid I went wrong with the paths somewhere (but they all look ok to me...)

reader.xml (in [reader drive]\reader)
Spoiler:
Code:
<reader pagesPerRefresh="6">
  <fontSizeTableEpub>
    <int>85</int>
    <int>90</int>
    <int>95</int>
    <int>100</int>
    <int>105</int>
    <int>110</int>
    <int>115</int>
    <int>120</int>
  </fontSizeTableEpub>

  <styles default="/mnt/sdcard/reader/css/default.css">
    <style name="Amasis" file="/mnt/sdcard/reader/css/Amasis.css" />
    <style name="Frutiger Neue" file="/mnt/sdcard/reader/css/FrutigerNeue.css" />
    <style name="Palatino nova" file="/mnt/sdcard/reader/css/PalatinoNova.css" />
    <style name="Really No2" file="/mnt/sdcard/reader/css/ReallyNo2.css" />
    <style name="Univers Next" file="/mnt/sdcard/reader/css/UniversNext.css" />
    <style name="Verdana" file="/mnt/sdcard/reader/css/Verdana.css" />
  </styles>
	
  <informationBar left="none" right="clock_hm" />
</reader>


default.css (in [reader drive]\reader\css)
Spoiler:
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)}

@font-face{ font-family: sans-serif; font-style:normal; font-weight:normal; src:url(res:///ebook/fonts/FrutigerNeueLTW1G-Regular.otf)}
@font-face{ font-family: sans-serif; font-style:italic; font-weight:normal; src:url(res:///ebook/fonts/FrutigerNeueLTW1G-Italic.otf)}
@font-face{ font-family: sans-serif; font-style:normal; font-weight:bold; src:url(res:///ebook/fonts/FrutigerNeueLTW1G-Bold.otf)}
@font-face{ font-family: sans-serif; font-style:italic; font-weight:bold; src:url(res:///ebook/fonts/FrutigerNeueLTW1G-BoldIt.otf)}

@font-face {font-family: monospace; font-weight: normal; font-style: normal; src:url(res:///ebook/fonts/HelveticaMonospacedW1G-Rg.otf)} 
@font-face {font-family: monospace; font-weight: normal; font-style: italic; src:url(res:///ebook/fonts/HelveticaMonospacedW1G-It.otf)} 
@font-face {font-family: monospace; font-weight: bold; font-style: normal; src:url(res:///ebook/fonts/HelveticaMonospacedW1G-Bd.otf)}
@font-face {font-family: monospace; font-weight: bold; font-style: italic; src:url(res:///ebook/fonts/HelveticaMonospacedW1G-BdIt.otf)}


body, body.book, body.text, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.calibre4 {
    font-family: serif; 
    line-height: 1.2;
    margin-left: 0; margin-right: 0;
    text-align: justify;
}


Amasis.css (in [reader drive]\reader\css)
(I didn't put any custom CSS in there yet, as I just wanted to get it working with the defaults.)
Spoiler:
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)}

body, body.book, body.text, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.calibre4 {
}


... plus the 5 other css files for the other fonts

Last edited by Frescard; 09-13-2012 at 06:37 PM.
Frescard is offline   Reply With Quote
Old 09-12-2012, 10:29 PM   #129
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by Frescard View Post
I'm having trouble activating custom CSS via the modified reader.
Jump over to this thread and read from that post onwards. Hopefully what is contained there should help fix your problems.

If not, can you post something in that thread - that seems to be where most of the Morkl reader discussions are happening now.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 09-12-2012, 10:39 PM   #130
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Frescard View Post
I'm having trouble activating custom CSS via the modified reader.
I went through the Wiki pages, and jackie's detailed post, but my T1 doesn't seem to find the referenced fonts.
If I use the definitions below, the fonts in the drop-down selection all look the same!
(Once I remove the styles section from reader.xml everything looks ok again.)
With Morkl's app the custom fonts are not used in the actual select-a-font drop-down menu - even though they were in the Sony stock app.

Did you actually view a real epub rather than just the font list?

Another problem could be the epub you're using. Try a few others. In addition I've attached a sample test epub which I often use for font testing. Does this one work?
Attached Files
File Type: epub EPUBFontTest.epub (96.5 KB, 189 views)
jackie_w is offline   Reply With Quote
Old 09-12-2012, 11:20 PM   #131
Frescard
Enthusiast
Frescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with othersFrescard plays well with others
 
Posts: 29
Karma: 2910
Join Date: Aug 2012
Location: Montreal, Canada
Device: Sony PRS-T1
Quote:
Originally Posted by jackie_w View Post
With Morkl's app the custom fonts are not used in the actual select-a-font drop-down menu - even though they were in the Sony stock app.

Did you actually view a real epub rather than just the font list?
Oh duh... That was it!
I guess I gave up too early, and thought that everything was lost, when the different styles didn't show up in the drop-down menu.
But once I actually opened the text, the fonts did change; and any global or font-specific style attributes I defined in my CSSs are correctly applied.

Thanks for that great detective work!
Frescard is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacks how to return to the original font lizayin Amazon Kindle 1 07-07-2011 07:25 PM
Changing original font css in ePub jlbfoot Sony Reader 4 12-28-2010 12:07 PM
Troubleshooting Font size changing Kumabjorn Amazon Kindle 1 07-23-2010 12:49 AM
DR1000 Changing Font-Size ThR iRex 6 06-21-2010 06:29 AM
Book Conversion - Changing Original Texts RWood Sony Reader 13 04-18-2007 01:28 PM


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


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