View Single Post
Old 06-15-2014, 04:01 PM   #19
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 Jellby View Post
Do you know where this 'res:///fonts' directory is located? Can it be accessed from outside the reading app? Could possibly an external CSS file be placed there and used with an @import rule?
There seem to be seperate stylesheets for epub books, kepub books, and pocket articles. The kepub stylesheet is .kobo/kepub/kepub-book.css, the pocket stylesheet is pocket.css but I don't know where it is located, and the epub stylesheet is res:///userStyle.css, but I don't know where that goes either (or if it even refers to a filesystem location at all).

Resources such as res:///fonts don't necessarily refer to a specific directory. I think res:///fonts refers to anywhere that the reader looks for fonts, including the fonts/ directory on the user partition, the /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/fonts/ directory on the system partition, and perhaps other places too.

I have tried adding rules such as @import `mystyle.css`; to the beginning of the built-in epub stylesheet, but either it is ignored or I haven't found the correct place to put mystyle.css.

In short, there may be a way to add a user stylesheet for epubs, but I don't think anyone has found out how to do it yet. (Other than modifying the internal stylesheet, as this patch does).
GeoffR is offline   Reply With Quote