![]() |
#31 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 #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> Code:
.mono {font-family: monospace} However, if your epub code looks like this: Code:
<p class="whatever"><span class="mono">blah ... blah ...</span></p> Code:
.mono {font-family: monospace} 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)` Last edited by jackie_w; 04-11-2015 at 07:45 PM. Reason: Thought #3 |
![]() |
![]() |
![]() |
#32 | ||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
Quote:
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). |
||
![]() |
![]() |
![]() |
#33 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
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. Last edited by GeoffR; 04-12-2015 at 04:42 AM. Reason: One other thing ... |
![]() |
![]() |
![]() |
#34 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() 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> 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:
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. Last edited by jackie_w; 04-12-2015 at 08:08 AM. |
|
![]() |
![]() |
![]() |
#35 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
![]() And the stylesheet with the statements added by the driver from the kobo-extra.css is: Spoiler:
|
![]() |
![]() |
![]() |
#36 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#37 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#38 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#39 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
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. |
![]() |
![]() |
![]() |
#40 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#41 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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); 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. |
![]() |
![]() |
![]() |
#42 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ![]() 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")} 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. |
![]() |
![]() |
![]() |
#43 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
|
|
![]() |
![]() |
![]() |
#44 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
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.
|
![]() |
![]() |
![]() |
#45 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |