View Single Post
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