04-20-2022, 10:16 AM | #31 |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There was a trick to allow you to reference fonts from the fonts directory as though they were embedded fonts. I don't know if it still works in 4.32.
Code:
@font-face { font-family: monospace; font-style: normal; font-weight: normal; src: url("res:///fonts/normal/Dark Courier"); } @font-face { font-family: monospace; font-style: normal; font-weight: bold; src: url("res:///fonts/bold/Dark Courier"); } @font-face { font-family: monospace; font-style: italic; font-weight: normal; src: url("res:///fonts/italic/Dark Courier"); } @font-face { font-family: monospace; font-style: italic; font-weight: bold; src: url("res:///fonts/bolditalic/Dark Courier"); } |
04-20-2022, 10:39 AM | #32 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2013
Device: Kobo Glo HD, Kobo Sage
|
It worked until 4.31, not anymore. Epubs are still fine, though.
|
Advert | |
|
04-20-2022, 11:37 AM | #33 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Using your "Dark Courier" example, pre-4.32 all that would have been required for kepub was
As it stands in 4.32, for kepubs you also need to embed the "Dark Courier" ttfs and add @font-faces to CSS, instead of step 2. Not difficult for one book but incredibly tedious and a diskspace hogger if a lot of books are affected. I think I'll solve my own problems by automating the embedding (when required) on-the-fly during calibre's send-to-device. Trying to develop something generic which would work for all users, all abilities, any font(s) using KoboTouchExtended or Kepubify would be more of a challenge, I think. |
|
04-20-2022, 12:23 PM | #34 | |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I do have Courier Prime as my monospace font for ePub. I'm going to have to test out if the added weight will work for Courier Prime if used as font-family: monospace; in ePub. |
|
04-20-2022, 01:29 PM | #35 | |
Enthusiast
Posts: 35
Karma: 10
Join Date: Oct 2021
Device: kobo glo hd
|
Quote:
I will study the information here carefully。 |
|
Advert | |
|
04-20-2022, 01:33 PM | #36 |
Enthusiast
Posts: 35
Karma: 10
Join Date: Oct 2021
Device: kobo glo hd
|
|
04-23-2022, 06:56 AM | #37 |
Connoisseur
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
|
I've done this before (not in Calibre), it's not a problem. The problem is that advanced settings (Publisher Default) do not affect the embedded font, but which is simply specified in CSS - they do. I had to go back to the previous firmware.
|
04-23-2022, 12:53 PM | #38 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
FWIW the sentence you quoted from my previous post is what I've actually put in place since I posted it. I don't like it at all as a "solution" but it does work OK for my limited needs. However, I did need to make significant code changes to my customised KoboTouchextended calibre driver to do it. It's not going to be a realistic option for most users. |
|
04-23-2022, 05:20 PM | #39 |
Wizard
Posts: 2,851
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
|
I asked over in the 4.32 firmware thread but I suspect it got buried and really it’s more of a patch question anyway.
With the whole WebKit rendering option in the config file do we need to use the patches that do something similar to them? Are they both getting to the same goal in different ways, or would they work together? And if they do work together could they be combined with a non matching option, e.g legibility and precision one from the configuration file the other from the patches? For those who don’t know it was discovered you can add the following to the config file: [Reading] webkitTextRendering=* Where the value is one of the following optimizelegibility geometricPrecision optimizeSpeed auto |
04-23-2022, 06:45 PM | #40 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
The 2 existing kobopatches,
I don't believe there's any actual harm leaving the patches enabled after editing the Kobo config - but it's pointless. In addition, the contents of the Kobo config file will survive a firmware upgrade whereas kobopatches won't. Besides, you need to convince yourself that the new "Kobo config method" adequately replaces the old "kobopatch method" on your own Kobos Assuming nothing unexpected crawls out of the woodwork, I'll be retiring both of the above kobopatches at the next firmware upgrade. P.S. Before anyone asks, I've no idea what you should expect to see on your Kobo if you set the config file to either of the following options: Code:
webkitTextRendering=auto webkitTextRendering=geometricprecision Last edited by jackie_w; 05-01-2022 at 11:40 AM. Reason: more explicit detail |
|
04-23-2022, 07:01 PM | #41 |
Evangelist
Posts: 495
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
According to spec, with auto, fonts under 20pt are rendered with optimizeLegibility, while fonts larger than 20pt are render with optimizeSpeed. But that's assuming the renderer Kobo is using works like other webkit-based renderers. Ditto for geometricPrecision; heck, Firefox-based renderers ignore it and treat it as optimizeLegibility.
|
04-23-2022, 07:09 PM | #42 |
Wizard
Posts: 2,851
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
|
Thanks Jackie, the other thread got pretty busy with cross chatter about another users Kobo issues and the new word count etc changes, so easy to miss things.
Another user had posted this for what each should do: https://developer.mozilla.org/en-US/...text-rendering Though I’d bet you’re already familiar with that, hopefully it’ll give others an idea. I’ve only just started using the legibility patch this firmware (I did disable it when I edited the config file) and in my limited use thus far they seem comparable. At some point I might sit down with the two Formas I have get their settings to be the same and aside from the patch vs config file and see if there’s a difference that can be spotted. But that’s going to wait until next weekend at least. |
04-23-2022, 07:54 PM | #43 | |
Groupie
Posts: 153
Karma: 27950
Join Date: Nov 2018
Device: Kobo Aura One, Kobo Forma
|
Quote:
Last edited by codychan; 04-24-2022 at 06:22 PM. |
|
04-23-2022, 07:56 PM | #44 | ||
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
|
||
04-23-2022, 08:00 PM | #45 | ||
Groupie
Posts: 153
Karma: 27950
Join Date: Nov 2018
Device: Kobo Aura One, Kobo Forma
|
Quote:
Quote:
``` # - ReplaceString: {Offset: 54, Find: "Georgia ", Replace: "sans-serif", MustMatchLength: yes} ``` Or replace sans-serif with my sideloaded font, it doesn't work either, some characters won't be displayed in it. |
||
Tags |
kobopatch, patch, patch32lsb, patches, patching |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Instructions for patching firmware 3.18.0 | GeoffR | Kobo Developer's Corner | 151 | 10-21-2016 07:15 AM |
Instructions for patching firmware 3.17.3 | GeoffR | Kobo Developer's Corner | 60 | 09-17-2015 06:35 PM |
Instructions for patching firmware 3.16.10 | GeoffR | Kobo Developer's Corner | 12 | 08-14-2015 04:40 AM |
Instructions for patching firmware 3.12.0 | GeoffR | Kobo Developer's Corner | 165 | 02-07-2015 10:22 AM |
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x | GeoffR | Kobo Developer's Corner | 285 | 08-27-2014 11:06 AM |