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 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,252
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:	261
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
Old 04-12-2015, 01:58 AM   #32
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by jackie_w View Post
I think the quotes in the url are only needed if there are spaces in the address so I'm not sure that matters.

Nevertheless I'll try Consolas myself and see what happens. Were you using the Consolas ttf files included in Windows 7? These are the only ones I have access to.
Either that or the Office 2010 ones, not sure which one is taking precedence on my system.

Quote:
Originally Posted by jackie_w View Post
@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)`
@jackie_w, thanks — tons of good info here. Yes, standard epub (not a kepub) and yes, the style is set on the p tag via a monospace class. I am using the patcher so I can look into enabling that option, assuming it's available for the version of firmware I use (3.1.1).

The most bizarre thing though is that the same exact CSS addition (the @font-face rules) added manually to the book's CSS makes the text render correctly, it only fails when the rules are appended from the kobo_extra.css during the transfer. The fonts have been on the reader forever and it's been power-cycled enough (the fonts do appear in the drop-down).

Also, the font that shows up when I use the kobo_extra.css appears to be neither Consolas nor the Amasis (the font chosen to render the text from the font selection menu).
dmapr is offline   Reply With Quote
Old 04-12-2015, 04:29 AM   #33
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 dmapr View Post
... the version of firmware I use (3.1.1).
Could that be what is making the difference? The internals of the epub reader had a major update in firmware version 3.5.0.

Edit:
Quote:
Originally Posted by dmapr View Post
The most bizarre thing though is that the same exact CSS addition (the @font-face rules) added manually to the book's CSS makes the text render correctly, it only fails when the rules are appended from the kobo_extra.css during the transfer.
One other thing you could test is manually adding the @font face rules at the end of the stylesheet, which is where they go when kobo_extra.css is used. Often if there is an error somewhere in the stylesheet then the epub reader will ignore everything in the stylesheet following the error.

Last edited by GeoffR; 04-12-2015 at 04:42 AM. Reason: One other thing ...
GeoffR is offline   Reply With Quote
Old 04-12-2015, 08:01 AM   #34
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by dmapr View Post
@jackie_w, thanks — tons of good info here. Yes, standard epub (not a kepub) and yes, the style is set on the p tag via a monospace class. I am using the patcher so I can look into enabling that option, assuming it's available for the version of firmware I use (3.1.1).
Wow, that's old, fw 3.1.1 must have something you really want to keep

The Patcher for fw 3.1.1 didn't include the 'Un-force font-family override...' option as standard but you're in luck because I created one for myself and (hoarder that I am) I still have it. If you add the following to your kpg.conf file it should work
Code:
<Patch>
patch_name = `jackie_w Font family override (all devices)`
patch_enable = `yes`
replace_bytes = 1117F74, 2C 20 70, 20 20 20
</Patch>
N.B. As with all patches, this code is specific to fw 3.1.1

I've also attached a 1-page test epub you can use to test what's going on.

If your kobo_extra.css is working correctly:
  • Before applying patch: The heading and paragraphs 3,4 should be displayed in your chosen monospace font (as specified in kobo_extra.css). Paragraph 1 would be in Amasis (if that's what you chose from the Font menu). Paragraph 2, I think should also be Amasis, or possibly Georgia (???) if the Kobo is confused and doesn't know what to use.
  • After applying patch: The heading and paragraphs 2, 3, 4 should be displayed in monospace. Paragraph 1 would still be Amasis.

If this is not what you're seeing then feel free to report back with your findings. As luck would have it my husband is using an old Glo, running fw3.1.1. It's not that he's attached to it but he's definitely from the school of 'if it ain't broke, don't fix it'. I applied the patch to the Glo when fw3.1.1 was current and the attached epub behaves as expected for me.
Attached Files
File Type: epub Kobo_Monospace.epub (2.6 KB, 188 views)

Last edited by jackie_w; 04-12-2015 at 08:08 AM.
jackie_w is offline   Reply With Quote
Old 04-12-2015, 10:14 AM   #35
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Testing jackie_w's epub on my wife's Glo running FW3.12.1, everything seems to be OK. Well, once I got the font name right Attached is a screenshot showing what it looks like. This is with no patches.

And the stylesheet with the statements added by the driver from the kobo-extra.css is:
Spoiler:
Code:
body {
    display: block;
    font-size: 1em;
    text-align: left
    }
h2 {
    display: block;
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    text-align: center;
    text-indent: 0
    }
.parastd {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    text-indent: 0
    }
.paramono {
    display: block;
    font-family: monospace;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    text-indent: 0
    }
.mono {
    display: inline;
    font-family: monospace
    }
@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)
    }
Attached Thumbnails
Click image for larger version

Name:	monospace-test.png
Views:	285
Size:	72.1 KB
ID:	137157  
davidfor is offline   Reply With Quote
Old 04-12-2015, 10:59 AM   #36
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by davidfor View Post
Testing jackie_w's epub on my wife's Glo running FW3.12.1, everything seems to be OK. Well, once I got the font name right Attached is a screenshot showing what it looks like.
So paragraph 2 is monospace even though you haven't applied the patch? Now that does surprise me Is Kobo's font-family 'enforcer technique' no longer effective?
jackie_w is offline   Reply With Quote
Old 04-12-2015, 11:09 AM   #37
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by GeoffR View Post
Could that be what is making the difference? The internals of the epub reader had a major update in firmware version 3.5.0.

Edit:


One other thing you could test is manually adding the @font face rules at the end of the stylesheet, which is where they go when kobo_extra.css is used. Often if there is an error somewhere in the stylesheet then the epub reader will ignore everything in the stylesheet following the error.
@GeoffR — yep, that's exactly where I put them. Literally the only difference is the auto-added rules are formatted nicely and do not have quotes. Everything else is exactly the same.

Also, in my experience when Kobo reader does encounter an error it drops all rules on the floor. I don't recall ever seeing a partially applied stylesheet.
dmapr is offline   Reply With Quote
Old 04-12-2015, 11:41 AM   #38
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by jackie_w View Post
Wow, that's old, fw 3.1.1 must have something you really want to keep

The Patcher for fw 3.1.1 didn't include the 'Un-force font-family override...' option as standard but you're in luck because I created one for myself and (hoarder that I am) I still have it. If you add the following to your kpg.conf file it should work
Code:
<Patch>
patch_name = `jackie_w Font family override (all devices)`
patch_enable = `yes`
replace_bytes = 1117F74, 2C 20 70, 20 20 20
</Patch>
N.B. As with all patches, this code is specific to fw 3.1.1

I've also attached a 1-page test epub you can use to test what's going on.

If your kobo_extra.css is working correctly:
  • Before applying patch: The heading and paragraphs 3,4 should be displayed in your chosen monospace font (as specified in kobo_extra.css). Paragraph 1 would be in Amasis (if that's what you chose from the Font menu). Paragraph 2, I think should also be Amasis, or possibly Georgia (???) if the Kobo is confused and doesn't know what to use.
  • After applying patch: The heading and paragraphs 2, 3, 4 should be displayed in monospace. Paragraph 1 would still be Amasis.

If this is not what you're seeing then feel free to report back with your findings. As luck would have it my husband is using an old Glo, running fw3.1.1. It's not that he's attached to it but he's definitely from the school of 'if it ain't broke, don't fix it'. I applied the patch to the Glo when fw3.1.1 was current and the attached epub behaves as expected for me.
@jackie_w,

I don't want to even pretend I can understand what was going on, but whatever it was, it's gone after I tried two other epubs. One is my old monospace test epub that I put together when I first added the kobo_extra.css and the other one is yours. Both of them worked, so I figured I would give one more go to the book that was failing before — and this time it worked. It's like some bad cache was flushed out or something. I'd be the first to suspect the user error, but there's nothing else that was different. And I checked, I have removed the manual addition of the rules from the failing book before transferring again.

Oh well, it's working now, so I'll just take it without further questioning. Thanks a lot for the help and I'm going to try and grab your patch as it sounds useful. Sticking to 3.1.1 because I like font weight/sharpness on separate controls and I don't want to edit the config for it.
dmapr is offline   Reply With Quote
Old 04-12-2015, 11:57 AM   #39
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by dmapr View Post
... and I'm going to try and grab your patch as it sounds useful.
Another miracle !!!

Re: the extra patch. Based on what davidfor said, if paragraph 2 from my test epub already displays correctly as monospace then maybe you don't need the extra patch at all. Since the original problem which caused me to add this patch I've blithely been continuing to re-apply it with every new fw update. I've never bothered to check whether the original problem still exists.

Last edited by jackie_w; 04-12-2015 at 12:01 PM.
jackie_w is offline   Reply With Quote
Old 04-12-2015, 02:58 PM   #40
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by jackie_w View Post
Another miracle !!!

Re: the extra patch. Based on what davidfor said, if paragraph 2 from my test epub already displays correctly as monospace then maybe you don't need the extra patch at all. Since the original problem which caused me to add this patch I've blithely been continuing to re-apply it with every new fw update. I've never bothered to check whether the original problem still exists.
Yes, it displayed correctly, but I used your patch anyway
dmapr is offline   Reply With Quote
Old 04-12-2015, 05:15 PM   #41
Bald Eagle
Connoisseur
Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.Bald Eagle ought to be getting tired of karma fortunes by now.
 
Bald Eagle's Avatar
 
Posts: 93
Karma: 1228255
Join Date: May 2009
Device: Aura H2O, Aura One, Libra Colour
I'd like to add a question here. If the fonts directory for the sideloaded fonts resides in the root of the via USB exported file system (i.e. on the same level as .kobo) what should the src url for the font look like?
This
Code:
src: url(res:///fonts/CharisSILCompact-Regular.ttf);
or this
Code:
src: url(res:///mnt/onboard/fonts/CharisSILCompact-Regular.ttf);
?

Unfortunately it makes no difference either way, I can select Charis SIL Compact from the font menu just fine, but when I set it in the CSS I get only Georgia when I set the font to Document Default.
Bald Eagle is offline   Reply With Quote
Old 04-12-2015, 05:49 PM   #42
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@Bald Eagle,

Just to fool you, neither of the above Try something like these instead:
Code:
@font-face {font-family: "Charis"; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/Charis SIL Compact")}
@font-face {font-family: "Charis"; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/Charis SIL Compact")}
@font-face {font-family: "Charis"; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/Charis SIL Compact")}
@font-face {font-family: "Charis"; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/Charis SIL Compact")}
where the blue label matches whatever you've put in your css class and the red name matches exactly the internal filename of the font family.

When you add new fonts to user memory /fonts (i.e. /mnt/onboard/fonts) and then reboot, the Kobo "does stuff" with the contents of the fonts directory and holds the data somewhere else internally.
jackie_w is offline   Reply With Quote
Old 04-12-2015, 09:10 PM   #43
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 jackie_w View Post
Re: the extra patch. Based on what davidfor said, if paragraph 2 from my test epub already displays correctly as monospace then maybe you don't need the extra patch at all. Since the original problem which caused me to add this patch I've blithely been continuing to re-apply it with every new fw update. I've never bothered to check whether the original problem still exists.
The patch is still needed in firmware 3.13.1. But the CSS it modifies is only included in the stylesheet when you select a font from the list. If you choose "Document Default" instead, then all of the original publisher's fonts will be active whether you use the patch or not.
GeoffR is offline   Reply With Quote
Old 04-12-2015, 09:26 PM   #44
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
So paragraph 2 is monospace even though you haven't applied the patch? Now that does surprise me Is Kobo's font-family 'enforcer technique' no longer effective?
Yes, that is your epub sideloaded via calibre with the earlier @font rules in the kobo_extra.css. The Glo is running stock 3.12.1 firmware.
davidfor is offline   Reply With Quote
Old 04-12-2015, 09:33 PM   #45
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by GeoffR View Post
The patch is still needed in firmware 3.13.1. But the CSS it modifies is only included in the stylesheet when you select a font from the list. If you choose "Document Default" instead, then all of the original publisher's fonts will be active whether you use the patch or not.
Are you sure? I know I tested a lot of combinations, but I thought I up with Georgia selected for the screen shot. I will try and check again tonight.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Side-loaded font bold-italic problem roger64 Kobo Reader 5 11-25-2013 08:15 PM
Aura: font options for side-loaded content? miquele Kobo Reader 4 07-05-2013 06:58 PM
Touch No dictionary for side-loaded books dragon77 Kobo Reader 14 04-25-2013 07:07 AM
Vox Disappearing side-loaded books fenric10 Kobo Tablets 0 02-25-2013 08:55 AM
syncing side-loaded books? elemenoP Which one should I buy? 5 08-20-2011 08:49 PM


All times are GMT -4. The time now is 01:08 PM.


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