Thread: Aura H2O Referencing internal fonts?
View Single Post
Old 12-11-2014, 05:32 AM   #4
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Ghitulescu View Post
The question is asked, because I want to get an H2O.
Therefore I don't have one and I don't know many implementation details.

For one, I noticed that most font-related topics contain the instruction "...create a folder named fonts in the root...". That means that either the fonts does not exist or the path to internal fonts is different.
The built-in fonts such as Georgia are stored on the system partition, the sideloaded fonts are on the user partition in /fonts, but both are referenced in the same way. ('res:///fonts' is a symbolic reference to all locations that might have fonts, not just to the /fonts directory; 'res:///fonts/normal' refers to normal weight fonts, there is no actual directory called /fonts/normal.)

Edit: I just tested it on my Glo with firmware 3.12.0, and it still works the same way. As an example: @font-face {font-family: Amasis; font-weight: normal; font-style: normal; src: url('res:///fonts/normal/Amasis')}, etc. references the built-in Amasis font, and then body {font-family: Amasis;} will make Amasis the default font for the book.

Last edited by GeoffR; 12-11-2014 at 06:22 AM. Reason: Tested on Glo 3.12.0
GeoffR is offline   Reply With Quote