Paul said in a private message to me :
Quote:
I downloaded your font test but I am confused. I think embedding is the simplest way but I don't quite understand it. In your embedded folder you have just the epub file. unpacking it i find that in the content/resources folder you have the usual 0,1, and 2 css files. I assume that in converting to the epub you had a custom css file that assigned the fonts to the tags. How did you get the TTF files to be included in the .epub? Did you do this manually by first renaming the .epub to .zip and then added the TTF files, then renamed it back to epub?
Any more help you can give me would be greatly appreciated! Please walk me through step by step!
|
You're right, the multiple CSS files were generated by Calibre, when the original ePub file was generated (not by me, but by the book's author himself).
And yes, the TTF files were manually inserted into the ePub file.
Take care, though, because the ePub specification is very sensitive about the zipping of the content (as said
here : "
This container is generally a zip file but the extension has been renamed to .epub. It has special requirements by including an uncompressed mime type file while the rest of the data in the file is compressed").
I usually use a program named
Total Commander (
here) which is capable of
going into a ZIP file without extracting it, and add/delete/edit files inside... It's a shareware though, but I'm pretty sure there are other means to generate a valid ePub file from its expanded contents.
So, what I do (step by step) is :
- open the ePub file in a tab inside Total Commander (control-Pagedown on the file itself opens its contents)
- navigate to the resources folder, and copy the TTF files I need
- edit one of the CSS files (I pick which one based on what they contain, and what I want to put into) which are not always organised the same way : add the reference to my fonts, and the formatting code (in your case the h1, h2 and p elements).
- navigate out of the ePub file, and let Total Commander work its magic...
- copy the ePub file to my PR505
- look at the marvelous result

Hope this helps,
David.