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 07-02-2026, 09:16 AM   #16
Siavahda
Groupie
Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.
 
Posts: 194
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
Quote:
Originally Posted by Sirtel View Post
It's supposed to work without Publisher Font. I haven't done it myself, but I've certainly read books where some sections used an embedded font and most of the book didn't. I never use Publisher Default. And yes, with epubs, not kepubs.
I'm glad that's how it works, because that's much smarter, but in that case I'm not sure what I'm doing wrong.

I have it set up in the CSS as

.blog {
display: block;
font-family: "Courier Prime";
font-size: 100%;
}

And then <div class="blog"></div> around the text in question. It previews perfectly in the editor...
Siavahda is offline   Reply With Quote
Old 07-02-2026, 09:38 AM   #17
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,371
Karma: 248000001
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
I think the code should be:

blog {
display: block;
font-family: "Courier Prime", monospace;
font-size: 100%;
}
Sirtel is offline   Reply With Quote
Old 07-02-2026, 10:01 AM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,029
Karma: 153695583
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The code should be:
Code:
blog {
font-family: monospace;
}
The font in the fonts directory should start with Courier in the file names of the font family. I'm not sure if it also has to be Courier in the font's metadata or just start with Courier.
JSWolf is offline   Reply With Quote
Old 07-02-2026, 12:23 PM   #19
Siavahda
Groupie
Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.
 
Posts: 194
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
Neither code worked.

Under Fonts in the left-hand menu of the Calibre Editor, there's four fonts. They all start CourierPrime - CourierPrime-Bold etc. I didn't name them that, they downloaded that way, so as far as I know that should be in their metadata as well?

In the Manage Fonts menu, Courier Prime shows as embedded. Monospace (which appeared there after I tried one of the codes Sirtel and JSWolf suggested, I didn't notice which) is also listed, but there's no tick to say it's embedded.

The start of my stylesheet looks like this

Code:
@font-face {
  src: url(CourierPrime-Bold.ttf);
  font-family: "Courier Prime";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
  }

@font-face {
  src: url(CourierPrime-BoldItalic.ttf);
  font-family: "Courier Prime";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
  }

@font-face {
  src: url(CourierPrime-Italic.ttf);
  font-family: "Courier Prime";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
  }

@font-face {
  src: url(CourierPrime-Regular.ttf);
  font-family: "Courier Prime";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  }
I'm not sure what else to check or share here.
Siavahda is offline   Reply With Quote
Old 07-02-2026, 12:57 PM   #20
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: 52,865
Karma: 180988374
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
What Jon is talking about is adding the monospace font to the fonts directory in the root of your Kobo's storage which will allow you to use <code>...</code> or font-family: monospace;. It will not work with other brands. Embedding a monospace font is probably the most general solution. Looking at your sample CSS, the font source may be incorrect. The following works for me with the fonts in the ePub's OEBPS/Fonts directory:

Code:
@font-face {
    font-family: 'Courier Prime';
    font-weight: bold;
    font-style: normal;
    src: url('../Fonts/CourierPrime-Bold.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: bold;
    font-style: italic;
    src: url('../Fonts/CourierPrime-BoldItalic.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: normal;
    font-style: italic;
    src: url('../Fonts/CourierPrime-Italic.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: normal;
    font-style: normal;
    src: url('../Fonts/CourierPrime-Regular.ttf');
}
I've attached a test epub using the embedded font so you can see the structure of the ePub which is rather important to know where the various bits and pieces live on the path internal to the ePub. Also note that I am using Sigil as the ePub editor.
Attached Files
File Type: epub monospace_test.epub (145.0 KB, 6 views)

Last edited by DNSB; 07-02-2026 at 01:00 PM.
DNSB is offline   Reply With Quote
Old 07-02-2026, 02:16 PM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,029
Karma: 153695583
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
What Jon is talking about is adding the monospace font to the fonts directory in the root of your Kobo's storage which will allow you to use <code>...</code> or font-family: monospace;. It will not work with other brands. Embedding a monospace font is probably the most general solution. Looking at your sample CSS, the font source may be incorrect. The following works for me with the fonts in the ePub's OEBPS/Fonts directory:

Code:
@font-face {
    font-family: 'Courier Prime';
    font-weight: bold;
    font-style: normal;
    src: url('../Fonts/CourierPrime-Bold.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: bold;
    font-style: italic;
    src: url('../Fonts/CourierPrime-BoldItalic.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: normal;
    font-style: italic;
    src: url('../Fonts/CourierPrime-Italic.ttf');
}

@font-face {
    font-family: 'Courier Prime';
    font-weight: normal;
    font-style: normal;
    src: url('../Fonts/CourierPrime-Regular.ttf');
}
I've attached a test epub using the embedded font so you can see the structure of the ePub which is rather important to know where the various bits and pieces live on the path internal to the ePub. Also note that I am using Sigil as the ePub editor.
I modified the ePub so it's not using any embedded fonts. This way it can be used to test if monospace with RMSDK is working. I have it working perfectly. I've attached it ito test if the fonts in the fonts directory are working properly.

Click image for larger version

Name:	screen_001.png
Views:	13
Size:	29.4 KB
ID:	224183
Attached Files
File Type: epub RMSDK_monospace_test.epub (2.0 KB, 6 views)

Last edited by JSWolf; 07-02-2026 at 02:20 PM.
JSWolf is offline   Reply With Quote
Old 07-03-2026, 04:36 AM   #22
Siavahda
Groupie
Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.
 
Posts: 194
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
DNSB's epub displayed perfectly.

JSWolf's didn't, the text was normal, not monotype.

So I guess that means the fonts I put in aren't working for some reason?

I redownloaded them (from fonts.google.com, it's been my source for all my fonts, and previously everything I've gotten from there has been perfect), removed the first set from my Kobo, and put the newly-downloaded copies into the fonts folder. Still the JSWolf epub didn't display correctly.

But I can select Courier Prime as a font, so it's definitely in there and the Kobo knows it's there. I have no clue what I'm doing wrong here.
Siavahda is offline   Reply With Quote
Old 07-03-2026, 08:54 AM   #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,330
Karma: 16800000
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Siavahda View Post
I have no clue what I'm doing wrong here.
The following advice is for epub only (i.e. not kepub) on Kobos:

The fontname needs to be precisely Courier not Courier Prime. If you do it correctly [* see below] you won't need to embed the monospace font in the epub and a simple generic font-family:monospace; in the epub CSS will suffice.
ETA: Also you won't need any @font-face statements for Courier in the epub's CSS.

[*] "Doing it correctly" means that the Kobo needs to "see" the 4 font files you copy to the Kobo /fonts directory as having the fontname Courier not Courier Prime. This involves 2 steps:
  1. The external font filenames are:
    Courier-Bold.ttf
    Courier-BoldItalic.ttf
    Courier-Italic.ttf
    Courier-Regular.ttf (or Courier.ttf I think)
  2. The *internal* font family name also needs to be Courier not Courier Prime. You can do this with a font editor (e.g. FontForge or ttfedit) to do this.

Step 2 is a PITA if you're not familiar with font editors so you could *try* step 1 only but if that doesn't work then you will need both steps. I know this works because it's what I have, i.e. 4 x 'Courier Prime' ttfs masquerading as Courier.

Last edited by jackie_w; 07-03-2026 at 09:25 AM. Reason: ETA: @font-faces
jackie_w is offline   Reply With Quote
Old 07-03-2026, 02:08 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,029
Karma: 153695583
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I think in this case, ttfedit will be easier to use.

I just had a look for Courier and I cannot easily find a font that's just Courier.

I have no idea what version of Courier I have as Courier. But it's setup just as @jackie_w's instructions and it works as you see from my screen grab.
JSWolf is offline   Reply With Quote
Old Today, 12:33 PM   #25
Siavahda
Groupie
Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.Siavahda can eat soup with a fork.
 
Posts: 194
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
It is absolutely insane that all this is necessary to get Kobo to show something EPUB *already does*.

I can't even get ttfedit to run/open, never mind figure it out. However, I managed to download a font that was just called Courier, so I was hoping that would work. Kobo recognises it as a font that can be selected, but unless I select Publisher Font the book doesn't display in Courier.

(I went back and edited the book's css, so it now just has the font-family:monospace rather than the Courier fonts I was trying to use before.)

I have files named courier-normal, courier-1, and just plain courier.ttf. I have no idea why Kobo's not accepting them. Or is (because I can choose it as a font option?) but won't read the monospace properly.
Siavahda is offline   Reply With Quote
Reply

Tags
css, kobo, small caps, smallcaps


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How widely supported are smallcaps? Land_Outcast ePub 105 06-16-2024 12:46 AM
Reestablishing smallcaps roger64 Workshop 8 05-27-2017 01:49 PM
smallcaps how to? JSWolf ePub 20 06-02-2016 02:40 PM
Kobo bookstore on Kobo Touch not showing prices (Canada) RobertJSawyer Kobo Reader 13 09-23-2012 08:30 PM
Smallcaps in Kindle cscotts Kindle Formats 5 01-26-2011 09:52 AM


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


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