Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2014, 03:29 AM   #1
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
Referencing internal fonts?

Pardon me if this subject has been discussed before, inspite my good will and long searches I could not find a way to reference the internal fonts (Georgia, Amasis etc) in the CSS.
Has anyone any idea what the path looks like?
To be clear: I don't want to use "Change default font to XYZ" from the menu, but to edit ePubs to pick one of the internal fonts.
Ghitulescu is offline   Reply With Quote
Old 12-11-2014, 04:32 AM   #2
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
This post has an example, it works the same for built-in and sideloaded fonts.
GeoffR is offline   Reply With Quote
Old 12-11-2014, 05:15 AM   #3
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
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.
Ghitulescu is offline   Reply With Quote
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
Old 12-11-2014, 05:48 AM   #5
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
Thank you.

Everything is now clear.
Ghitulescu is offline   Reply With Quote
Old 12-11-2014, 11:23 AM   #6
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
According to my test results, this method only supports epub and can't support kepub...
I find this solution for kepub in this post
https://www.mobileread.com/forums/sho...35&postcount=6

Last edited by scoky; 12-12-2014 at 12:43 AM. Reason: Solved
scoky is offline   Reply With Quote
Old 12-12-2014, 04:12 AM   #7
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 scoky View Post
According to my test results, this method only supports epub and can't support kepub...
I tested on my Glo with a sideloaded kepub, and the epub 'res:///fonts' method worked for the kepub too. (I didn't use Calibre to make the kepub, just copied the .epub to .kepub.epub)

Edit: After further testing, I see the 'res:///fonts' method doesn't work with kepubs for some fonts. e.g. Amasis works for both epub and kepub, but Avenir only works in epub.

Last edited by GeoffR; 12-12-2014 at 06:00 AM. Reason: doesn't work with kepubs for some fonts
GeoffR is offline   Reply With Quote
Old 12-12-2014, 07:03 AM   #8
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
I tested on my Glo with a sideloaded kepub, and the epub 'res:///fonts' method worked for the kepub too. (I didn't use Calibre to make the kepub, just copied the .epub to .kepub.epub)

Edit: After further testing, I see the 'res:///fonts' method doesn't work with kepubs for some fonts. e.g. Amasis works for both epub and kepub, but Avenir only works in epub.
If I only use "font-family: XXXX;" (XXXX is the font name in Font Face of Aa setting) to use sideload fonts, it can work perfectly. So the kepubs don't need to be specified the font path.
However, if I use your method like this
@font-face {font-family: "zw"; font-weight: normal; font-style: normal; src: url('res:///fonts/normal/XXXX')} and font-family: XXXX,
it only work correctly in epubs and not in kepubs.
scoky is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-referencing for anthologies markouellette Calibre 7 12-30-2013 09:25 AM
Touch referencing fonts tshering Kobo Reader 14 07-07-2012 12:52 PM
Chapter Links/cross-referencing greenPublisher Sigil 1 12-07-2011 06:34 PM
Internal cross referencing Kumabjorn General Discussions 8 11-05-2010 12:07 PM
PRS-500 Flasher - renaming new internal fonts with Font-creator pitolee Sony Reader Dev Corner 36 09-10-2008 09:37 PM


All times are GMT -4. The time now is 11:38 AM.


MobileRead.com is a privately owned, operated and funded community.