View Single Post
Old 06-10-2010, 03:40 PM   #34
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Hi Logseman,
Not really a tutorial but a simple example you could customise to your own preferences. Anyone else feel free to chip in if I've missed something.
  1. Copy tselling's hacked file AdobeViewer.app into directory system/bin on the PB360. Make sure you use tselling's hack which corresponds to the PB360 firmware version you're using, i.e. 14.2 or 15.2

  2. Copy the .ttf font files you want to use into the system/fonts directory. Make careful note of their filenames, they are case-sensitive.

  3. Copy the following into a text file called userStyle1.css (case-sensitive) and copy to the root directory of your PB360 (see notes below for some description). This example uses the Charis SIL font family as the serif font. It is free.

    Code:
    @font-face {font-family:serif; font-weight:normal; font-style:normal; src: url(res:///mnt/ext1/system/fonts/CharisSILR.ttf);}
    @font-face {font-family:serif; font-weight:normal; font-style:italic; src: url(res:///mnt/ext1/system/fonts/CharisSILI.ttf);}
    @font-face {font-family:serif; font-weight:bold; font-style:normal; src: url(res:///mnt/ext1/system/fonts/CharisSILB.ttf);}
    @font-face {font-family:serif; font-weight:bold; font-style:italic; src: url(res:///mnt/ext1/system/fonts/CharisSILBI.ttf);}
    
    html {font-family:serif;}
  4. Not sure whether this step is necessary but I switch the PB360 off at this point, then re-boot it.

  5. Now open an epub file with AdobeViewer and you should see the fonts you specified in userStyle1.css

Notes:
  • The first 4 @font-face lines of the example CSS file specify the exact locations where your selected serif fonts, Charis Regular, Italic, Bold and BoldItalic are to be found.

  • The last line (html...) tells AdobeViewer to use the fonts listed in the first 4 @font-face lines whenever the epub wants to display serif.

  • If your epub has its own fonts physically embedded inside, as some commercial ones do, then these would be used (I think) in preference to yours.

  • Once you get it working you can add 4 lines to specify your preferred sans-serif fonts.
    @font-face {font-family: sans-serif; ...}

  • ... and your preferred monospace fonts.
    @font-face {font-family: monospace;...}

  • You can even specify a SmallCaps font if you get adventurous.
jackie_w is offline   Reply With Quote