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 02-20-2014, 10:59 AM   #16
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 819
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Thank you so much! I appreciate your taking the time to provide such a detailed response.

i

Quote:
Originally Posted by jackie_w View Post
There are 2 methods depending on why your book needs monospace. I did document option 2 below somewhere in this forum but I can't, for the life of me, remember which thread it was part of, so here it is again:
  1. If you want to read the whole book in monospace (e.g. Screenplays often expect mono throughout) you just need to sideload a monospace font (preferably all 4 flavours, regular, italic, bold, bolditalic, but not essential) and pick the new mono font from the Kobo font menu. Don't forget to power off/on after adding new fonts.

  2. If there are just selected parts of a book which need to be mono (e.g. author wants to simulate an old typewritten letter, code samples in tech manuals).

    Firstly, make sure you've already sideloaded a monospace font into your Kobo fonts directory.

    Secondly, the internal css in the epub needs to have font-family: monospace in all the relevant places.

    Thirdly, you need to enable this feature in the calibre KOBOTOUCH driver. Then in your custom kobo_extra.css include css statements something along these lines (where Dark Courier is the internal name of my sideloaded mono font. It's important to make the code match the internal font name exactly)
    Code:
    @font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/Dark Courier")}
    @font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/Dark Courier")}
    @font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/Dark Courier")}
    @font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/Dark Courier")}
    If you've only got a single ttf (i.e. only the regular), you can simplify the extra code in kobo_extra.css to
    Code:
    @font-face {font-family: monospace; src: url("res:///fonts/normal/Dark Courier")}
    Once you've added the mono stuff to your custom kobo_extra.css, all future epubs transferred to the Kobo via calibre will get the extra css inserted into the epub during the Send-to-Device process. The calibre library copy of the epub remains untouched. You don't need to worry about adding this extra mono css to epubs which won't need it as it will just be ignored.

I'm not sure whether option 2 will work for kepubs but it definitely works for standard epubs (at least in fw 3.1.1 and many earlier releases).
icallaci is offline   Reply With Quote
Old 02-20-2014, 11:01 AM   #17
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
KOBOTOUCH driver: calibre seems to have already enabled the kobotouch driver v 2.1.6 , so do I just add CSS/ tweak as needed ? as per the linked example ?

do I need to look up my firmware version ** & tick " attempt to support newer firmware" ?

** device information 3.1.1.( long number 12/11/13)
cybmole is offline   Reply With Quote
Advert
Old 02-20-2014, 11:26 AM   #18
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 cybmole View Post
KOBOTOUCH driver: calibre seems to have already enabled the kobotouch driver v 2.1.6 , so do I just add CSS/ tweak as needed ? as per the linked example ?
Just create a file, kobo_extra.css, containing the css widows/orphans rule and drag-drop it to the root of the AuraHD.

In calibre go to Prefs - Plugins - Device interface plugins - select KoboTouch 2.1.6 in list - Customize plugin - check Modify CSS box (bottom left) - OK - Apply - Close
All done and forget about it unless/until there's more CSS rules you'd like to add to kobo_extra.css.

Quote:
Originally Posted by cybmole View Post
do I need to look up my firmware version ** & tick " attempt to support newer firmware" ?

** device information 3.1.1.( long number 12/11/13)
Based on last week's calibre changelog (v1.24), davidfor has already built in support for Kobo fw 3.2. It has supported your version, 3.1.1, for several weeks, so there's no need to check the box unless you're running a very old version of calibre. If there's a version conflict you would have seen an error message when you connected the Kobo to calibre. As you didn't mention this problem, you can leave that box as-is.
jackie_w is offline   Reply With Quote
Old 02-20-2014, 11:49 AM   #19
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 cybmole View Post
I appreciate it's my own doing. I dislike having to page thru a TOC before I can get to chapter 1 so I zap any such at edit stage.
Couldn't agree more but how did you do the actual deletion? Was it in the controlled environment of Sigil/calibre Editor or some other way. The latter is not recommended if you want to keep your epubs valid. At the very least the opf file needs to know if one of its files has been mercilessly zapped.

Quote:
Originally Posted by cybmole View Post
please expand on " necessary clean up" - I usually jsut delete the html toc then have the modify plug in clean up the "real" TOC.

is there a different clean up which will take out the invalid href=......
I did a couple with regex but it has to be done carefully or the xlink:href on title page can get zapped also
As far as I know, the Modify Epub TOC cleanup options only look at the toc.ncx TOC file not any useless TOC which exists as one of the epub's html files. In your example I think the broken links are to the inline TOC html file not the ncx file.

As you know which epub has this problem, I'd suggest opening it in Sigil and/or calibre Editor and running their respective Book Check options to see if the broken links are flagged.

For future epubs it's worth experimenting with Sigil and/or calibre Editor to see if deleting the TOC html file automatically prevents the broken links. One may do a more thorough job than the other but without experimenting I don't know which is currently in the lead. Long term I'd put my money on calibre Editor. Either will be better than an 'uncontrolled' delete.
jackie_w is offline   Reply With Quote
Old 02-20-2014, 11:53 AM   #20
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Whoops - more sloppy work by me.
I had the kobotouch driver, but the link talks about the kobotouch extended driver.
that was NOT installed so I have just installed it.

I will proceed slowly- check that simple book transfers are still well hevaed before gettign into tweaking it


".......built in support for Kobo fw 3.2. It has supported your version, 3.1.1, for several weeks,"

but I only started yesterday, so how come Kobo desktop software did not give me v3.2 at my 1st setup.

should I try to update - is there a useful changelog that tells me whether to bother .....
will a 3.1 t to 3.2 update zap my books, muy last page read etc....

I found this instruction so let's see if there's an update waiting... no it just says sync complete..

To upgrade your eReader using Wi Fi, from you Home page:

Tap the Menu icon.
The Quick Settings will appear.
Tap the Sync icon.
Your eReader will connect to the network let you know if there are any updates waiting
cybmole is offline   Reply With Quote
Advert
Old 02-20-2014, 12:00 PM   #21
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by jackie_w View Post
Couldn't agree more but how did you do the actual deletion? Was it in the controlled environment of Sigil/calibre Editor or some other way. ....


.
sigil editor - locate the toc.xhtml or similarly named file in left hand list of xhtml files - delete it - along with any unwanted front/back matter ads, bibliographies, useless paper book indexes etc. I use book view to check what's in those files before i zap them.

there's no reason for doing this other habit: than I like my for-reading version de-cluttered and I like a page count that reflects the story length.

I don't do anything else, I just trust sigil housekeeping to do the basics when it saves ( clean on save is set)
cybmole is offline   Reply With Quote
Old 02-20-2014, 12:13 PM   #22
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 cybmole View Post
Whoops - more sloppy work by me.
I had the kobotouch driver, but the link talks about the kobotouch extended driver.
that was NOT installed so I have just installed it.

I will proceed slowly- check that simple book transfers are still well hevaed before gettign into tweaking it
As its name suggests the KoboExtended driver adds a few extra options to the standard KoboTouch driver. Its purely your choice which one you use (the standard does everything I need). You can read all about KoboExtended plugin in the calibre plugin subforum. As far as I know it's used mainly by those who like to enable the option to convert their standard epubs to kepubs on-the-fly during calibre send-to-device. I have seen it written that it's advisable to disable the driver you're not using, but whether that's still true I don't know.

Quote:
Originally Posted by cybmole View Post
".......built in support for Kobo fw 3.2. It has supported your version, 3.1.1, for several weeks,"

but I only started yesterday, so how come Kobo desktop software did not give me v3.2 at my 1st setup.
Because Kobo fw rollouts are always staggered and UK residents never seem to be at the front of the queue. (Personally I see this as a Good Thing - no nasty surprises for me).

Quote:
Originally Posted by cybmole View Post
should I try to update - is there a useful changelog that tells me whether to bother .....
will a 3.1 t to 3.2 update zap my books, muy last page read etc....

I found this instruction so let's see if there's an update waiting... no it just says sync complete..

To upgrade your eReader using Wi Fi, from you Home page:

Tap the Menu icon.
The Quick Settings will appear.
Tap the Sync icon.
Your eReader will connect to the network let you know if there are any updates waiting
Just keep your eye on this thread. There never seems to be a useful official changelog.
jackie_w is offline   Reply With Quote
Old 02-20-2014, 12:21 PM   #23
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 icallaci View Post
Thank you so much! I appreciate your taking the time to provide such a detailed response.
You're welcome
jackie_w is offline   Reply With Quote
Old 02-20-2014, 12:35 PM   #24
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by jackie_w View Post
As its name suggests the KoboExtended driver adds a few extra options to the standard KoboTouch driver. Its purely your choice which one you use (the standard does everything I need).

.
OK I will revert to the standard one, one less change to cope with
cybmole is offline   Reply With Quote
Old 02-20-2014, 01:18 PM   #25
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,355
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by cybmole View Post
".......built in support for Kobo fw 3.2. It has supported your version, 3.1.1, for several weeks,"

but I only started yesterday, so how come Kobo desktop software did not give me v3.2 at my 1st setup.
If you are using Kobo's desktop software, it is currently at version 3.6 which you can download and install from http://www.kobosetup.com/ if your version did not automatically update.

The firmware update is not pushed to every Kobo ereader at the same time. Kobo slowly rolls it out based on Ghod alone knows what criteria. Be patient and it will eventually show up. Either that or someone will capture the download link and it will be posted likely in the Developer's Corner in the Direct Links to Kobo Firmware thread.


Quote:
Originally Posted by cybmole View Post
should I try to update - is there a useful changelog that tells me whether to bother .....
will a 3.1 t to 3.2 update zap my books, muy last page read etc....
Kobo is not fond of changelogs. You are likely to find more information in the Firmware 3.2.0 threads in this forum.

One question on my part. I regularly remove pretty much all font references when I edit epubs with Sigil. About the only ones that survive are monospaced fonts references. I haven't noticed the display glitches you mentioned so I am wondering what OS and what Sigil version you are using.

Regards,
David
DNSB is offline   Reply With Quote
Old 02-20-2014, 01:24 PM   #26
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,355
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by cybmole View Post
there's no reason for doing this other habit: than I like my for-reading version de-cluttered and I like a page count that reflects the story length.

I don't do anything else, I just trust sigil housekeeping to do the basics when it saves ( clean on save is set)
Sounds much like what I do. I also ensure that the first entry in the toc.ncx points to the first part of the ebook that I want to read. This skips over the cover, copyright, also written, etc. the first time I start reading the book. This does require me to all too often convert the chapter header to a format that Sigil can use to generate a TOC entry but it beats the fun of manually editing the toc.ncx file.

I prefer not to trust Sigil's clean on save -- often you get another clean on open and I've had chapters missing large chunks after the automated process. Instead I use the Validate EPUB with FlightCrew button (the big green checkmark) and manually fix many of the issues.

Regards,
David
DNSB is offline   Reply With Quote
Old 02-20-2014, 02:09 PM   #27
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by DNSB View Post
If you are using Kobo's desktop software, it is currently at version 3.6 which you can download and install from http://www.kobosetup.com/ if your version did not automatically update.

The firmware update is not pushed to every Kobo ereader at the same time. Kobo slowly rolls it out based on Ghod alone knows what criteria. Be patient and it will eventually show up.
David
my desktop software is at 3.5 & showing no desire to upgrade itself, but I have no plans to use that anyway, unless forced to in order to do some Kobo-specific thing.

I edit with sigil 7.0.2 mostly, sometimes with the new calibre editor , Windows 7 74 bit.
but I've not been in the habit of removing all font-family & line-height stuff. Anything that had no effect on a Sony reader display was just left in the book.

Then I got into the habit of adding p {font-family: times;( via calibre conversion CSS) just to improve sigil book view; not realising , until Jackie enlightened me, that current sigil version has a preference setting for that.

and even more recently I began adding extra hyphenation and widows/orphans settings as they mattered to the Sony T3, but not to the Sony T2

Jackie explained very well, that because Calibre puts new font-family CSS into specific classes the kobo device options will not over-ride it.

I've tested all that she wrote on font-family issues & she is spot on.

I think I am now clear on all the line-height & font-family issues, except for not having a simple method to find zap all specific line-height instances during a convert or a modify operation.

I tested with also with a few untouched epub library loans, direct from ADE onto Kobo, & see mixtures of locked/unlocked fonts + locked /unlocked line heights
cybmole is offline   Reply With Quote
Old 02-20-2014, 03:35 PM   #28
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,355
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by cybmole View Post
my desktop software is at 3.5 & showing no desire to upgrade itself, but I have no plans to use that anyway, unless forced to in order to do some Kobo-specific thing.
My main use for the desktop application is capturing URLs during updates. Otherwise, it's a handy indicator that Kobo is about to release a firmware update -- if the desktop app updates, a new firmware release is about to happen.

Quote:
Originally Posted by cybmole View Post
I edit with sigil 7.0.2 mostly, sometimes with the new calibre editor , Windows 7 74 bit.
I'd recommend updating to Sigil 7.4. I had some odd display issues with 7.1/7.2 which seems to have been fixed in 7.4 though I still get the random scroll to the bottom of the current file being edited.

I got into editing epubs due to the annoying way some publishers like to display their ebooks -- who needs large left/right and top/bottom margins to make an ebook look more like a deadtree book? After a rather short while, I got hooked on using regular expressions to simplify my editing tasks.

Regards,
David
DNSB is offline   Reply With Quote
Old 04-11-2015, 04:05 PM   #29
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
There are 2 methods depending on why your book needs monospace. I did document option 2 below somewhere in this forum but I can't, for the life of me, remember which thread it was part of, so here it is again:
  1. If you want to read the whole book in monospace (e.g. Screenplays often expect mono throughout) you just need to sideload a monospace font (preferably all 4 flavours, regular, italic, bold, bolditalic, but not essential) and pick the new mono font from the Kobo font menu. Don't forget to power off/on after adding new fonts.

  2. If there are just selected parts of a book which need to be mono (e.g. author wants to simulate an old typewritten letter, code samples in tech manuals).

    Firstly, make sure you've already sideloaded a monospace font into your Kobo fonts directory.

    Secondly, the internal css in the epub needs to have font-family: monospace in all the relevant places.

    Thirdly, you need to enable this feature in the calibre KOBOTOUCH driver. Then in your custom kobo_extra.css include css statements something along these lines (where Dark Courier is the internal name of my sideloaded mono font. It's important to make the code match the internal font name exactly)
    Code:
    @font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/Dark Courier")}
    @font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/Dark Courier")}
    @font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/Dark Courier")}
    @font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/Dark Courier")}
    If you've only got a single ttf (i.e. only the regular), you can simplify the extra code in kobo_extra.css to
    Code:
    @font-face {font-family: monospace; src: url("res:///fonts/normal/Dark Courier")}
    Once you've added the mono stuff to your custom kobo_extra.css, all future epubs transferred to the Kobo via calibre will get the extra css inserted into the epub during the Send-to-Device process. The calibre library copy of the epub remains untouched. You don't need to worry about adding this extra mono css to epubs which won't need it as it will just be ignored.

I'm not sure whether option 2 will work for kepubs but it definitely works for standard epubs (at least in fw 3.1.1 and many earlier releases).

Sorry to drag out this old post, but I was trying to make monospace work with no avail following these steps and here's what I was able to determine:

The following lines are in my kobo_extra.css (and it doesn't matter whether the font file urls are single- or double-quoted):
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')}
However, when the book is transferred to the device, here's what becomes of that 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)
    }
Note that along with formatting the quotes around the urls were dropped. Now, if I paste the code from my kobo_extra.css directly into the EPUB's file stylesheet, the monospace works. If I use the kobo_extra.css, it doesn't. The quotes were the only significant difference I could see between the two. Any ideas what I might be doing wrong?
dmapr is offline   Reply With Quote
Old 04-11-2015, 04:32 PM   #30
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
Note that along with formatting the quotes around the urls were dropped. Now, if I paste the code from my kobo_extra.css directly into the EPUB's file stylesheet, the monospace works. If I use the kobo_extra.css, it doesn't. The quotes were the only significant difference I could see between the two. Any ideas what I might be doing wrong?
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.
jackie_w 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 07:30 AM.


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