Mobileread
ePub custom Fonts on all Sonys
#291  JSWolf 01-14-2012, 11:33 PM
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.
Reply 

#292  Phil_C 01-14-2012, 11:55 PM
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.
Reply 

#293  jackie_w 01-15-2012, 10:12 AM
Quote Phil_C
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'.
Reply 

#294  Phil_C 01-15-2012, 12:55 PM
@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.
Reply 

#295  jackie_w 01-15-2012, 03:23 PM
Quote Phil_C
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 Phil_C
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 Phil_C
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.
Reply 

 « First  « Prev   (30/30)
Today's Posts | Search this Thread | Login | Register