Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2012, 10:48 PM   #286
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@Phil_C

You shouldn't need to resort to Search&Replace to make it work. It's not immediately obvious to me why your current settings aren't working. Difficult to say more without trying it myself.

However, I would be tempted to do a minor edit to the raw html file before you import it to Calibre. Try changing the <body ...> tag by removing the red bit
Code:
<body bgcolor="#ffffff" style="FONT-WEIGHT:normal; FONT-SIZE:small; MARGIN-BOTTOM:245px; LINE-HEIGHT:normal; FONT-FAMILY:GeorgiaEInk15" text="#000000">
Then reconvert with your existing ExtraCSS.

In fact, most of the info in the html's existing <body ...> tag is redundant. You could try simplifying it right down to
Code:
<body>
and see how that converts.

Edit: If none of that works I can only think that the font filenames are not quite correct. They should be stored in the reader's internal memory in a directory [drive:]\fonts and the filenames, Amasis-MT-Bold.ttf etc., must match exactly those in the @font-faces. All filenames, directory names are case-sensitive

The only other thing to check is that the Amasis font files are stored in the reader's internal memory in a directory called

Last edited by jackie_w; 01-14-2012 at 11:05 PM.
jackie_w is offline   Reply With Quote
Old 01-14-2012, 11:03 PM   #287
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: 76,474
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Converting ePub to ePub... Bad idea... Use Sigil to edit the CSS.
JSWolf is offline   Reply With Quote
Old 01-14-2012, 11:07 PM   #288
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by JSWolf View Post
Converting ePub to ePub... Bad idea... Use Sigil to edit the CSS.
...but he's converting zip to epub.
jackie_w is offline   Reply With Quote
Old 01-14-2012, 11:31 PM   #289
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 255
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E; Kobo Clara BW
@jackie_w

I don't think I have an html editor. Office 2007 does not seem to include one. I'd try what you suggested in an attempt to narrow things down.

But that still involves extra steps that I want to avoid for regular use. Easier to use the Search & Replace workaround.

But, like you, I'd like to know how to get this to work through Extra CSS. The Reader finds the font files just fine once the correct font name is in the body statement.

The whole problem is that darn unorthodox body tag form Book Designer. (Although I claim almost no knowledge of things html.)

My purpose is to be able to select any of several fonts I have installed on the PRS-350 when I am about to begin reading a new book. I have the Extra CSS text for each font saved in a text file. The Book Designer htm files for all books are in Calibre. So I just want to decide on a font, copy the related Extra CSS to Calibre, and quickly convert the book from the html zip file to epub. Send to Reader. Read.

Sounds simple.
Phil_C is offline   Reply With Quote
Old 01-14-2012, 11:32 PM   #290
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: 76,474
Karma: 136564766
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
...but he's converting zip to epub.
What is in this zip file? ePub is zip and can be zip if the extension is changed.
JSWolf is offline   Reply With Quote
Old 01-14-2012, 11:33 PM   #291
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: 76,474
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Phil, if your book has been anyplace near Word, then you may find a mess in the CSS that can cause your embedded fonts to fail.

If your book went through Word, take the ePub and load it into Sigil and clean it up so your embedded fonts will work.
JSWolf is offline   Reply With Quote
Old 01-14-2012, 11:55 PM   #292
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 255
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E; Kobo Clara BW
My books are edited in RTF for cleanup, then imported into Book Designer for layout, and output as htm. When the htm is placed in Calibre, it's saved as a zip file (by Calibre).

I use Calibre to convert the zip (htm) to epub while setting fonts, chapter breaks, line height, etc. Everything works except the problem with the <body> tag in Extra CSS. Can't get the font name right without workaround as stated in previous posts.
Phil_C is offline   Reply With Quote
Old 01-15-2012, 10:12 AM   #293
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Phil_C View Post
My books are edited in RTF for cleanup, then imported into Book Designer for layout, and output as htm. When the htm is placed in Calibre, it's saved as a zip file (by Calibre).

I use Calibre to convert the zip (htm) to epub while setting fonts, chapter breaks, line height, etc. Everything works except the problem with the <body> tag in Extra CSS. Can't get the font name right without workaround as stated in previous posts.
To answer your 'html editor' question... an html file is just a text file and can be edited with any old text editor, e.g. Notepad in Windows. The reason people refer to 'html editors' is that some of the better text editors (e.g. the free Notepad++ on Windows) recognise the file extension as an html file and will colour-code the text and tags to make it much easier to see what you're doing.

If you want to be able to change fonts from your PRS350 (or PRS300) whilst you're reading, as the mood takes you, then you should really take a look at installing the PRSPlus custom firmware. Font changing is only one of many very nice features which will be added to the standard Sony features.

If you do install PRSPlus (it really is very easy to install) then you do not need to do anything at all with fonts in Calibre ExtraCSS. You would put all these Amasis @font-face statements in a .css file (created with a simple text editor) and store it in the designated directory on your Sony. You create one .css file for each font-family you may want to use. PRSPlus then has a menu feature which allows you to pick which .css you want from a list. Once you've set up all your .css files, it couldn't be easier to switch from one to another. One of the main benefits of doing it this way is that it keeps the epubs in your Calibre library nice and clean, free of device-specific and font-specific code. So when you want to re-read the epub in a few years you won't need to clear it all out so you can read it on a completely different device.

As an additional benefit, these PRSPlus css files can also be set up to display your epubs in a range of font sizes. This helps to overcome the poor Sony only-3-zoom-levels-available.

Edit: On re-reading your earlier post, do you already have PRSPlus? If so, then perhaps we need to look at generalising your existing PRSPlus css files to be 'more accommodating'.

Last edited by jackie_w; 01-15-2012 at 10:20 AM. Reason: ... on second thoughts ...
jackie_w is offline   Reply With Quote
Old 01-15-2012, 12:55 PM   #294
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 255
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E; Kobo Clara BW
@jackie_w

I previously considered PRSPlus, but decided not to mess with the original Sony FW. I think I would also lose my built-in dictionaries on the PRS-350.

Your earlier suggestion appears to work, i.e replacing this

Code:
<BODY style="FONT-WEIGHT:normal; FONT-SIZE:small; MARGIN-BOTTOM:245px; LINE-HEIGHT:normal; FONT-FAMILY:GeorgiaEInk15" text=#000000 bgColor=#ffffff>
with this

Code:
<body>
Why that code is there if it's not needed, I do not know. You said it appeared to be redundant, and that's the way it looks. (Except the font must fall back to some default, since that code contained the only font reference in the htm document.)

I don't need to switch fonts in the middle of a book. I just like to decide on a font before beginning a book, and want the ability to quickly use Calibre to convert the original htm to epub with the selected font.

So now I can do this:

-Clean up book in RTF.
-Create book in BookDesigner and output to htm.
-Edit htm in Notepad to adjust the single body tag as above.
-Place htm in Calibre for conversion using Extra CSS for font designation.

I have saved Extra CSS statements for each font that I like. So it's only a matter of copying one of them to the Calibre conversion Look & Feel screen and converting to epub. (The rest of the conversion settings are already saved in Calibre Prefs.)

Works great for a guy that does not know html.
Phil_C is offline   Reply With Quote
Old 01-15-2012, 03:23 PM   #295
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Phil_C View Post
I previously considered PRSPlus, but decided not to mess with the original Sony FW. I think I would also lose my built-in dictionaries on the PRS-350.
No, I can vouch for the fact that you wouldn't lose the built-in dictionaries, but the decision is yours.


Quote:
Originally Posted by Phil_C View Post
Why that code is there if it's not needed, I do not know. You said it appeared to be redundant, and that's the way it looks. (Except the font must fall back to some default, since that code contained the only font reference in the htm document.)
Many of the settings are just hard-coding the default values that would be used if the code wasn't there. If no font-family is specified then the generic font-family:serif is assumed.


Quote:
Originally Posted by Phil_C View Post
Works great for a guy that does not know html.
Glad to hear it but you now know about the <body> tag. As an aside, a little knowledge of html and css goes a long way when trying to tweak ebooks.
jackie_w is offline   Reply With Quote
Reply

Tags
epub, fonts


Forum Jump

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


All times are GMT -4. The time now is 07:15 PM.


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