View Single Post
Old 04-11-2015, 05:14 PM   #31
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,257
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@dmapr,

Consolas seems OK to me - see attached photo (excuse poor camera work). I don't think there's anything wrong with your @font-faces - the quotes got auto-stripped from my urls too by the time they reached the Kobo.

This is a copy/paste from my kobo_extra.css:
Code:
@font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/Consolas")}
@font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/Consolas")}
@font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/Consolas")}
@font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/Consolas")}
Just a thought: were you using a standard epub or was it a kepub? I've only ever managed to get css font-family:monospace and font-family:sans-serif working properly in standard epubs. With kepub I suspect embedding is the only answer - but I could be wrong .

Just a thought #2: Did you remember to do a full power off/on after adding the Consolas ttf files?

ETA:

Just a thought #3: There is also the possibility that your particular epub is falling foul of the fudge code in the Kobo nickel firmware which tries to make sure that the font you select from the Font menu list is applied despite the epub internal css code. Unless you've taken steps against it, if your epub code looks like this:
Code:
<p class="mono">blah ... blah ...</p>
and
Code:
.mono {font-family: monospace}
the Kobo "helpfully" overrides all <p>s with the font chosen in the Font menu. It may be helpful for many users but it causes me nothing but trouble.

However, if your epub code looks like this:
Code:
<p class="whatever"><span class="mono">blah ... blah ...</span></p>
and
Code:
.mono {font-family: monospace}
that should always work OK.

If you use the Kobo Patcher, a better option is to prevent Kobo forcing font-family override on your <p> tags. There is an option you can enable in the libnickel.so.1.0.0.patch file near the bottom
Code:
patch_name = `Un-force font-family override p tags (std epubs)`
Attached Thumbnails
Click image for larger version

Name:	consolas.jpg
Views:	262
Size:	57.8 KB
ID:	137138  

Last edited by jackie_w; 04-11-2015 at 07:45 PM. Reason: Thought #3
jackie_w is offline   Reply With Quote