View Single Post
Old 11-24-2009, 03:37 PM   #15
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
Quote:
Originally Posted by djgreedo View Post
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.
You mean loading Calibri using "res:" URL trick? res: URL works exactly like embedded font from CSS perspective. I think if res: URL cannot be resolved (say, because EPUB was loaded on a different device), it will fall back to the next font family.

What I meant is something more complex: if the Calibri is listed in CSS user stylesheet of the device or if you use non-Adobe EPUB renderer that supports system fonts natively and Calibry is installed on the system.

Quote:
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.
I think it should work, but I am interested to know if it actually does.

When you say that you don't want to use default fonts at all, what you really mean is that current default font that Adobe SDK uses is not helpful for your purpose. Note that there are other renderers out there and some of them may not be able to load custom fonts at all, but they may have more robust default fonts. For this reason, you should always specify one of the generic names as a last item in the list of fallback font families (it is recommended CSS practice in general). This way you at least get serif vs. sans serif or monospace right.
Peter Sorotokin is offline   Reply With Quote