Quote:
Originally Posted by Peter Sorotokin
When you embed fonts you have to use @font-face to bind font files to a particular family name, say, "Vera Sans":
@font-face { font-family: "Vera Sans"; ... ; src:url(...); }
Then you can specify this CSS:
body { font-family: Calibri, "Vera Sans", sans-serif; }
This will try to use Calibri, if it is available on the platform. If it is not available, it will try Vera Sans font - which will work as long as font embedding is supported by the Reading System. Finally, if neither of them work it will use generic sans serif font.
Note that in the implementations based on Adobe Reader Mobile SDK, the only way to make a platform (non-embedded) font available is to include corresponding @font-face definition it in the user stylesheet (which most devices don't support at this point).
|
That sounds perfect (assuming I can get it to work...). Thanks.
If I understand correctly, it will try to find Calibri, but I currently only get it to use Calibri (my Sony PRS-700 that is) by embedding the font in the ebook and referring to it using the "font-face" and putting in the URL to the files on the device (I copied the files on there myself). That is, I'm not actually using Calibri to replace one of the default fonts, it is just a font added to a folder on the device and referred to in the ebook's CSS.
With your method, can this work? Can I point to 2 fonts in the CSS, one that is public domain and embedded in the book and one that will only be on the device if the user sources it themselves? And of course set the priority so the book first tries to get the Calibri font, then falls back to the public domain font if Calibri isn't found. I don't want to use default fonts at all because of the unicode characters that aren't supported in the default font.