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 12-19-2011, 02:24 PM   #76
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by pssquirrel View Post
FYI below from another thread. I don't understand where "internal flash" is to put the fonts, but this is very promising.
Genius!!! I think internal flash just means standard internal memory. Create a directory called /fonts in the int.mem root directory, i.e. in the same dir which also contains /Books /DCIM and /Sony_Reader. Then copy any fonts you like in there. Then you can reference them in your epub css something like...

Customise serif to Arno Pro
Code:
@font-face { font-family: serif; font-weight: normal; font-style: normal;  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/ArnoPro.ttf);}
@font-face { font-family: serif; font-weight: normal; font-style: italic;  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/ArnoPro-Italic.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: normal;  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/ArnoPro-Bold.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: italic;  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/ArnoPro-BoldItalic.ttf);}
Customise sans-serif to Fontin:
Code:
@font-face {font-family: sans-serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Fontin_Sans_R_45b.otf);}
@font-face {font-family: sans-serif; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Fontin_Sans_I_45b.otf);}
@font-face {font-family: sans-serif; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Fontin_Sans_B_45b.otf);}
@font-face {font-family: sans-serif; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Fontin_Sans_BI_45b.otf);}
Customise monospace to Dark Courier:
Code:
@font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/DarkCourier.ttf);} 
@font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/DarkCourierI.ttf);} 
@font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/DarkCourierB.ttf);}
@font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/DarkCourierBI.ttf);}
All bold and italics now working with any old ttf/otf font family.

Thank you so much for passing this on, pssquirrel. Happy dance

Last edited by jackie_w; 12-19-2011 at 02:33 PM. Reason: clarification
jackie_w is offline   Reply With Quote
Old 12-19-2011, 08:13 PM   #77
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
Fabulous! Once again you have my gratitude, jackie_w, for connecting all the dots :-)
pssquirrel is offline   Reply With Quote
Advert
Old 12-20-2011, 02:11 PM   #78
seabee
Connoisseur
seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.seabee writes the songs that make the whole world sing.
 
seabee's Avatar
 
Posts: 79
Karma: 40957
Join Date: Aug 2011
Location: Paris, France
Device: Kobo Mini
FYI, as I expected (I did the test), if you replace res:///ebook/fonts/../../mnt/sdcard/fonts/myfont.ttf by res:///ebook/fonts/../../mnt/extsd/fonts/myfont.ttf, you can put the font myfont.ttf in the fonts directory at the root of a micro-sd card instead of the reader's internal memory.

Last edited by seabee; 12-20-2011 at 02:11 PM. Reason: highlight
seabee is offline   Reply With Quote
Old 12-23-2011, 09:02 PM   #79
Andreea
Junior Member
Andreea began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2011
Device: Sony PRST1
Quote:
Originally Posted by jackie_w View Post
I just tried it on my non-rooted PRST1.
The res:///ebook/fonts/xxx.otf location works great for getting the internal extra fonts (Amasis, PalatinoNova etc) to work correctly. One has to wonder how Sony were able to make such a pig's ear of the extra fonts feature. Including the standard 4 @font-face statements in the css file works a treat,
e.g for Amasis:
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);}
these statements must be included in the css file inside the "fonts" directory?
how can i access this directory?
Tks.
Andreea is offline   Reply With Quote
Old 12-24-2011, 03:47 PM   #80
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Andreea View Post
these statements must be included in the css file inside the "fonts" directory?
how can i access this directory?
Tks.
Using the method you have referenced you do not need to worry about a fonts directory. It already exists inside your T1, even though you can't see it.

These @font-face statements must be inserted into the .css file found inside each epub book. The @font-faces you quoted are telling the epub where to find the 4 Amasis font files contained in the T1. This method is a workaround to ensure that bold and italics work correctly when using Amasis. You must also leave Selected Font Type set to 'Original'.
  • Use your favourite unzip utility (e.g. 7zip, WinRAR, Calibre Tweak epub) to open the epub.
  • Find the .css file and copy/paste the @font-faces into it using your favourite text editor.

I always put the @font-faces at the beginning of the .css file (but I'm not sure whether this is important).
Note: if the .css file has a header line, something like the following, put the @font-faces after it.
Code:
@namespace h "http://www.w3.org/1999/xhtml";

Edit: If you are using Calibre to create your epubs, you can set it up to automatically copy the @font-faces into the epub during the conversion process by copying them into the Look&Feel - ExtraCSS box

Last edited by jackie_w; 12-24-2011 at 03:53 PM. Reason: more info
jackie_w is offline   Reply With Quote
Advert
Old 12-24-2011, 08:00 PM   #81
Andreea
Junior Member
Andreea began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2011
Device: Sony PRST1
Quote:
Originally Posted by jackie_w View Post
Using the method you have referenced you do not need to worry about a fonts directory. It already exists inside your T1, even though you can't see it.

These @font-face statements must be inserted into the .css file found inside each epub book. The @font-faces you quoted are telling the epub where to find the 4 Amasis font files contained in the T1. This method is a workaround to ensure that bold and italics work correctly when using Amasis. You must also leave Selected Font Type set to 'Original'.
  • Use your favourite unzip utility (e.g. 7zip, WinRAR, Calibre Tweak epub) to open the epub.
  • Find the .css file and copy/paste the @font-faces into it using your favourite text editor.

I always put the @font-faces at the beginning of the .css file (but I'm not sure whether this is important).
Note: if the .css file has a header line, something like the following, put the @font-faces after it.
Code:
@namespace h "http://www.w3.org/1999/xhtml";

Edit: If you are using Calibre to create your epubs, you can set it up to automatically copy the @font-faces into the epub during the conversion process by copying them into the Look&Feel - ExtraCSS box
thank you for your time jackie, it is clear now how to include these statements in the css file inside each epub, the post no.29 that confuse me:

Quote:
I finally succeeded for references to any PRS-T1 integrated font !

for exemple:
@font-face {
font-family: MyFont1;
font-weight: normal;
font-style: normal;
src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Regular.otf);
}

Don't need to include a copy of these fonts in each ePUB !
p.s. I'm trying to use Amasis on all my epubs and it's gonna take me some time to modify each css file.

Last edited by Andreea; 12-24-2011 at 08:33 PM.
Andreea is offline   Reply With Quote
Old 12-25-2011, 01:34 PM   #82
vishcompany
Addict
vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.
 
vishcompany's Avatar
 
Posts: 283
Karma: 138550
Join Date: Mar 2009
Device: Gen3(†); PB302(↓); PRS-350; T1; voyage
Sorry for asking a maybe stupid question, but why does everybody want to reference to an already existing font, if you can just as well choose it from a menu?
vishcompany is offline   Reply With Quote
Old 12-25-2011, 02:02 PM   #83
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by vishcompany View Post
Sorry for asking a maybe stupid question, but why does everybody want to reference to an already existing font, if you can just as well choose it from a menu?
Because, unfortunately, displaying bold and/or italics in an epub is completely unpredictable when using the standard select-a-font feature if you use anything other than 'Original'. Many people probably don't care, but there are also many who do.

As an English-only reader I'm not 100% sure of the following, but I expect someone will correct me if I'm wrong...
  • If you want to retain bold/italics in some (all???) Eastern European language, you would also need to add manual references to one of the 6 extra fonts (Amasis etc) as the 'Original' font does not contain many (any???) of the special accented characters.
  • Reading in Chinese (and maybe other languages) is only possible if you manually add the reference to a different internal font (e.g. DroidSansFallback) not 'Original' or any of the 6 extra fonts (Amasis etc).
jackie_w is offline   Reply With Quote
Old 12-25-2011, 02:42 PM   #84
vishcompany
Addict
vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.
 
vishcompany's Avatar
 
Posts: 283
Karma: 138550
Join Date: Mar 2009
Device: Gen3(†); PB302(↓); PRS-350; T1; voyage
Thank you, jackie, that's fair enough.
Does this block selection of other fonts?

When checking out this for myself (trying to get external fonts working), I found out, that selection through menu is blocked, if I do not call the font family "serif" or "sans-serif" but e.g. "Fontin" (That's what I am used from PRS+ css style selection).

EDIT: I added your information into the wiki.

Last edited by vishcompany; 12-25-2011 at 02:50 PM.
vishcompany is offline   Reply With Quote
Old 12-26-2011, 07:37 AM   #85
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by vishcompany View Post
Does this block selection of other fonts?

When checking out this for myself (trying to get external fonts working), I found out, that selection through menu is blocked, if I do not call the font family "serif" or "sans-serif" but e.g. "Fontin" (That's what I am used from PRS+ css style selection).
I think that as long as you use the generic font-family names (serif, sans-serif, monospace) in your @font-face statements rather than specific font name labels (e.g. Charis, Fontin, "Times New Roman", Amasis) then the standard select-a-font feature should work as well (or as badly ) as it's always worked.

Personally, I've always done it this way, even in PRS+. I never could see the point in using those specific font name labels, it's just one more thing that needs changing when you clone an old PRS+ css file to try out a new font.
jackie_w is offline   Reply With Quote
Old 12-26-2011, 10:51 AM   #86
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jackie_w View Post
I think that as long as you use the generic font-family names (serif, sans-serif, monospace) in your @font-face statements rather than specific font name labels (e.g. Charis, Fontin, "Times New Roman", Amasis) then the standard select-a-font feature should work as well (or as badly ) as it's always worked.

Personally, I've always done it this way, even in PRS+. I never could see the point in using those specific font name labels, it's just one more thing that needs changing when you clone an old PRS+ css file to try out a new font.
I'll have to give that a try and see what happens. I'll report back after I try it.
JSWolf is offline   Reply With Quote
Old 12-26-2011, 12:34 PM   #87
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by JSWolf View Post
I'll have to give that a try and see what happens. I'll report back after I try it.
Don't forget you will also need to make sure your css body statement uses the generic name serif rather than the specific font name label.

If you're planning on trying it with PRS+ css files on earlier Sony models, this is an example of one of mine in case it helps. I've tried to cover as many Calibre body variations as I've found necessary to date.
Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3  {
    font-family: serif; 
    line-height: 1.2; 
    font-size: 0.85em !important;}
Note: In fact, it's quite possible that the font-family: serif; line is redundant as all the ereaders I've owned seem to use font-family: serif as the epub default in the absence of more specific css. Nevertheless, I've left it in all my PRS+ css files, just in case.

Last edited by jackie_w; 12-26-2011 at 12:36 PM. Reason: clarify
jackie_w is offline   Reply With Quote
Old 12-26-2011, 06:11 PM   #88
jagwar
Junior Member
jagwar began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2011
Device: T1
Is it possible to reference to a font that works for cyrillic letters? Or should I add a font to the /font directory? Can you tell me which font works?
jagwar is offline   Reply With Quote
Old 12-26-2011, 06:58 PM   #89
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by jagwar View Post
Is it possible to reference to a font that works for cyrillic letters? Or should I add a font to the /font directory? Can you tell me which font works?
I'm not sure what the situation with cyrillic is. I'm guessing the 'Original' font is unsatisfactory. Are all the cyrillic characters in your epub displayed correctly when you choose one of the 6 extra fonts (Amasis, Palatino etc) using the standard select-a-font feature?
jackie_w is offline   Reply With Quote
Old 12-26-2011, 07:22 PM   #90
jagwar
Junior Member
jagwar began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2011
Device: T1
Quote:
Originally Posted by jackie_w View Post
I'm not sure what the situation with cyrillic is. I'm guessing the 'Original' font is unsatisfactory. Are all the cyrillic characters in your epub displayed correctly when you choose one of the 6 extra fonts (Amasis, Palatino etc) using the standard select-a-font feature?
Original just shows "???"
The others work fine. Thank you, you helped me already!

So now i just need to add your lines from above to the css extras and the reader will automatically open the book in Amasis? Can you tell me the right code for that? I'm a total noob on this topic. Thanks!
jagwar 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 01:17 AM.


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