12-19-2011, 02:24 PM | #76 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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);} 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);} 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);} 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 |
|
12-19-2011, 08:13 PM | #77 |
ebooknut
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 :-)
|
Advert | |
|
12-20-2011, 02:11 PM | #78 |
Connoisseur
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 |
12-23-2011, 09:02 PM | #79 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2011
Device: Sony PRST1
|
Quote:
how can i access this directory? Tks. |
|
12-24-2011, 03:47 PM | #80 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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'.
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 |
|
Advert | |
|
12-24-2011, 08:00 PM | #81 | ||
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2011
Device: Sony PRST1
|
Quote:
Quote:
Last edited by Andreea; 12-24-2011 at 08:33 PM. |
||
12-25-2011, 01:34 PM | #82 |
Addict
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?
|
12-25-2011, 02:02 PM | #83 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
As an English-only reader I'm not 100% sure of the following, but I expect someone will correct me if I'm wrong...
|
|
12-25-2011, 02:42 PM | #84 |
Addict
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. |
12-26-2011, 07:37 AM | #85 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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. |
|
12-26-2011, 10:51 AM | #86 | |
Resident Curmudgeon
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:
|
|
12-26-2011, 12:34 PM | #87 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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;} Last edited by jackie_w; 12-26-2011 at 12:36 PM. Reason: clarify |
|
12-26-2011, 06:11 PM | #88 |
Junior Member
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?
|
12-26-2011, 06:58 PM | #89 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
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?
|
12-26-2011, 07:22 PM | #90 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2011
Device: T1
|
Quote:
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! |
|
|
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 |