Quote:
Originally Posted by jackie_w
There's some confusion here, I think. The 3 items in my 'Getting monospace to work in kepubs' link are not options, they're steps, i.e. you have to do all 3 to see monospace in kepubs.
If your book's CSS contains:
Code:
font-family: "Courier GR", monospace;
then the Kobo will respond to:
- the monospace value if you send-to-device as epub
- the "Courier GR" value if you send-to-device as kepub.
|
[ding sound]The lightbulb goes on! In hindsight I'm not sure how I worked out that items 2 and 3 were a sequnce and not options, given that item 1 was always necessary. This all makes sense now.
Quote:
This is, indeed, a PITA for kepubs. It's unfortunate, but normal, behaviour. I also don't want to hard-code font-family names in my calibre library's master copy of the epub, especially if I want to change the mono font to something else later on.
|
Yes, I'm also very much interested in not having to embed my current favourite monospace font name in case that changes in the future too. Also it's just not "clean"

.
Quote:
My personal workaround for avoiding having to manually edit every epub individually was to hack my copy of the KoboTouchExtended plugin so that all occurrences of font-family:monospace; in a CSS file are auto-corrected to my mono-fontname-of-choice when sending kepubs via the calibre send-to-device. Whether this is a practical solution depends on where you're at with your new project of 'let's learn about calibre plugins'. [Hacking KTE to indulge your latest "bright ideas" can be quite addictive - but that's a story unsuited to this thread.]
|
My first look out your "get old books" plugin very much confounded me. I've had a little success with tinkering with the Count Pages plugin but that was isloated to a small section of code. I had a quick look inside the KTE plugin and can see no obvious place to even start with inspecting/modifying all CSS files. Did you create something like a
css_names() based on the existing
html_names() and then loop over those files with a search/replace?
For a slightly different approach, is there a way of mixing
these @font-face definitions and the
Modify CSS option in the KOBOTOUCH driver so that a reference to
font-family: monospace; will do what I want?
Quote:
BTW, kepubs displaying font-family:monospace; as sans-serif as default is also unfortunate, but normal, behaviour. It's been this way as long as I can remember.
|
That's a very interesting definition of "normal" then !!!
Quote:
I'll believe it when I see it, but we live in hope.
|
I shall join you in living in hope...