![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Dec 2010
Device: Sony Reader PRS-350
|
Sony PRS-T3 Custom Fonts Tutorial
Key to referencing your custom fonts from within an ePub is the understanding how the reader device interprets paths:
When you connect your reader to your computer it shows up as two drives: Code:
READER (F:) SETUP (G:) Code:
READER (F:) + Sony_Reader + database + Digital Editions + media + books + images + notepads Code:
F:\Sony_Reader\media\books\… As seen from inside your Android T3 device this path translates to Code:
/ebook/fonts/../../mnt/sdcard/Sony_Reader\media\books\… Knowing this we can start our home run. Whatever directory structure you create on your device, it's always known to your T3 as prefixed with Code:
/ebook/fonts/../../mnt/sdcard/ Code:
READER (F:) + Sony_Reader + fonts + myfonts Code:
/* Sans-Serif Fonts */ @font-face { font-family: sans-serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/myfonts/Candara.ttf); } @font-face { font-family: sans-serif; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/myfonts/Candarab.ttf); } @font-face { font-family: sans-serif; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/myfonts/Candarai.ttf); } @font-face { font-family: sans-serif; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/myfonts/Candaraz.ttf); } Now we are done with the creation of the underlying font infrastructure. All that remains to do is make your newly installed fonts known to the reader application. Don't worry—that's easy. All we have to do is referencing our mycustomfonts.css stylesheet from inside our ePubs. This we can do easily with Sigil or the calibre book editor: Open your ePub with the Editor of your choice and insert one line at the top of the main stylesheet: Code:
@import url('res:///ebook/fonts/../../mnt/sdcard/fonts/mycustomfonts.css'); Have fun. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Fields as Collections on Sony PRS-600? | eosrose | Library Management | 0 | 11-05-2011 05:39 PM |
Touch Fonts question (special characters in stock and custom fonts) | levil | Kobo Reader | 20 | 09-23-2011 01:51 PM |
Sony PRS 950 System Font Mod tutorial | jessie102 | Sony Reader | 7 | 12-26-2010 07:06 AM |
Sony PRS-505 Visual tutorial? | Amalthia | Sony Reader | 2 | 02-12-2009 01:10 PM |
Ended Custom Sony Prs-505 Book Light | aapezzuto | Flea Market | 9 | 04-24-2008 02:08 PM |