01-14-2009, 01:23 PM | #1 | |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
ePub custom Fonts on all Sonys
In some earlier post in one of the many fora here on MobileRead, somebody posted instructions on how to use a custom non-embedded(!) font with ePub files on the 500 and 505. Has anyone done this successfully on the 700?
The posted directions were: Quote:
Xenophon EDIT : scroll down to post 9 of this thread for all the css code you will need, and in post 18 i've added some screen caps and a step-by-step guide for people who are less experienced with using css. --zelda pinwheel Last edited by zelda_pinwheel; 03-11-2009 at 01:36 PM. Reason: adding locations of important posts |
|
01-14-2009, 01:25 PM | #2 |
creator of calibre
Posts: 44,529
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I haven't tried this, but you should be able to put the font in any directory
|
Advert | |
|
01-14-2009, 01:37 PM | #3 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
The '/Data' directory is where the externally-mountable Reader-internal flash partition is mounted from the Reader's perspective. So if you create a file 'foobar.otf' just in the root directory of the Reader-internal memory, the Reader (and the CSS you need to write) sees it at '/Data/foobar.otf'.
|
01-14-2009, 01:38 PM | #4 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
My reading of the original posts is that res:///Data/ is the URL of the root of the Reader-internal memory, so you should create the FONT directory (or whatever) there.
|
01-14-2009, 01:57 PM | #5 | |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Quote:
And thanks to all the previous posters for their answers to my question! Xenophon |
|
Advert | |
|
01-14-2009, 02:42 PM | #6 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
|
01-16-2009, 12:35 PM | #7 |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
I spent several hours last night experimenting with this feature. I was unable to get it to work. I tried every combination I could of the following:
I also attempted using Opentype fonts, both truetype and PS style. I was not able to construct a working example, no matter the combination. At this point, I'd really appreciate it if someone who's gotten this to work on their 700 (or 505!) would be willing to send me both a zip of the actual font file they used AND the css they used to invoke it. Xenophon |
01-20-2009, 02:23 PM | #8 |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Bump...
|
01-30-2009, 11:13 PM | #9 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
I meant to answer this in more detail earlier...
You need three basic ingredients to do this:
You can put the font-files anywhere on the Reader's internal memory partition, but let's keep it simple and put them all in a folder named 'fonts' at the root of the partition. So when you open the Reader's internal memory you should see all the normal stuff plus the 'fonts' folder you created. Just put all the font files you want to use in there. The CSS needs to have '@font-face' rules describing the font-family and pointing at the font files, including all combination of variant font properties. Here's an example using the open source font "TeX Gyre Cursor": Code:
@font-face { font-family: "TeX Gyre Cursor"; font-weight: normal; font-style: normal; src: url(res:///Data/fonts/texgyrecursor-regular.otf); } @font-face { font-family: "TeX Gyre Cursor"; font-weight: bold; font-style: normal; src: url(res:///Data/fonts/texgyrecursor-bold.otf); } @font-face { font-family: "TeX Gyre Cursor"; font-weight: normal; font-style: italic; src: url(res:///Data/fonts/texgyrecursor-italic.otf); } @font-face { font-family: "TeX Gyre Cursor"; font-weight: bold; font-style: italic; src: url(res:///Data/fonts/texgyrecursor-bolditalic.otf); } Next you need some CSS which actually tells AdobeDE to use the typeface you've configured. The simplest way to do that is with a rule like: Code:
body { font-family: "TeX Gyre Cursor", serif; } If you're using the Calibre GUI, you can just put all the text in the textbox for override CSS. If you're using the command-line tools, you can create a file with all the CSS in it and pass the filename as the argument to the '--override-css' option. For an example, I created the attached book from the attached sources with the attached fonts using the attached CSS file[1] (whew!) using the command: Code:
any2epub --override-css fonts.css.txt TBsrc/content.opf -o TestBook.epub [1] The file is named "fonts.css.txt" instead of just "fonts.css" due only to the MR uploaded filename rules. |
01-31-2009, 03:29 PM | #10 | |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Thanks!! I'll try it out this weekend. When you wrote:
Quote:
Xenophon |
|
02-03-2009, 10:55 PM | #11 |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
llasram's post gave me all the information I needed. It's really nice reading books in Adobe Garamond Pro, complete with real italics instead of the Sony Reader's crappy synthesized italics. And, indeed, the CSS telling AdobeDE to actually use the fonts was exactly the part I was missing. Xenophon |
02-14-2009, 10:59 PM | #12 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jan 2009
Device: prs-700
|
Does this only work for PDF's or does it also work to change fonts in sony content?
|
02-15-2009, 01:25 PM | #13 |
curmudgeon
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
I don't think it works for PDFs, and it certainly does not work for LRF or LRX files. But it works wonderfully well for EPUB files. Note that you have to be able to either edit the EPUB or create it yourself. I create mine using Calibre, starting from Microsoft Reader (.lit) files.
Xenophon |
02-16-2009, 05:26 AM | #14 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jan 2009
Device: prs-700
|
Thanks, I'm learning more about calibre every day and will give that a try for EPUB files.
What a bummer though about the LRF/LRX files. I figured as much. |
02-26-2009, 06:25 PM | #15 |
Enthusiast
Posts: 36
Karma: 10
Join Date: Feb 2009
Device: Sony PRS700BC
|
It would be nice if someone wrote a windows program to change fonts for us dummies!!!
hint....hint. Since I'm totally lost about what your talking about. John |
Tags |
epub, fonts |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any Reader With Custom Fonts and Full Justification? | Loose_Appeal | Which one should I buy? | 2 | 07-16-2010 08:16 AM |
ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-10-2010 12:34 AM |
Custom TTF fonts in MOBI books? | jpt | Astak EZReader | 21 | 11-21-2009 09:24 AM |
Test for custom entities in ePUB | Jellby | ePub | 9 | 05-27-2009 07:45 AM |