Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2025, 01:22 PM   #1
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Calibre Shows Pseudo-Italic for Regular Custom Font

I have encountered a weird issue on an older Calibre ebook viewer for windows (v3.48):

When I embed a font family like Literata, Calibre displays all regular text in pseudo-italic, meaning it skews the font by itself. Bizarrely enough, Calibre displays intentional italic correctly, using the correct font-src.

It doesn't help to explicitly tell the font-style (which anyways should get inherited properly), it always displays regular text in a pseudo-italic style. I've tried other fonts as well (Lora, EBGaramond), Calibre always does its weird thing.

Since I'm pretty sure someone wants to see the CSS code, here it comes:

Code:
@font-face {
  font-family: "Lora";
  font-weight: normal;
  font-style: normal;
  src: url("../fonts/Lora-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: normal;
  font-style: italic;
  src: url("../fonts/Lora-Italic.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: bold;
  font-style: normal;
  src: url("../fonts/Lora-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: bold;
  font-style: italic;
  src: url("../fonts/Lora-BoldItalic.ttf") format("truetype");
}

body {
  font-family: "Lora", serif;
}
Does anybody know why this is?

Many thanks in advance
Slevin#7 is offline   Reply With Quote
Old 06-07-2025, 01:44 PM   #2
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: 79,501
Karma: 145863170
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 Slevin#7 View Post
I have encountered a weird issue on an older Calibre ebook viewer for windows (v3.48):

When I embed a font family like Literata, Calibre displays all regular text in pseudo-italic, meaning it skews the font by itself. Bizarrely enough, Calibre displays intentional italic correctly, using the correct font-src.

It doesn't help to explicitly tell the font-style (which anyways should get inherited properly), it always displays regular text in a pseudo-italic style. I've tried other fonts as well (Lora, EBGaramond), Calibre always does its weird thing.

Since I'm pretty sure someone wants to see the CSS code, here it comes:

Code:
@font-face {
  font-family: "Lora";
  font-weight: normal;
  font-style: normal;
  src: url("../fonts/Lora-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: normal;
  font-style: italic;
  src: url("../fonts/Lora-Italic.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: bold;
  font-style: normal;
  src: url("../fonts/Lora-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Lora";
  font-weight: bold;
  font-style: italic;
  src: url("../fonts/Lora-BoldItalic.ttf") format("truetype");
}

body {
  font-family: "Lora", serif;
}
Does anybody know why this is?

Many thanks in advance
First off, get rid of the format in the font declaration as it's not needed. Then try again. if you still have a problem, post the entire of the CSS. and up to the end of the first parahraph of the HTML where you see the problem.
JSWolf is offline   Reply With Quote
Old 06-07-2025, 02:41 PM   #3
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Well, I've followed your advice to strip the format declaration (although it's recommended by various sources), but unfortunately without any change.

The CSS is stripped down to this (pretty similar to the code above):

Code:
@charset "utf-8";

@font-face {
  font-family: "literata-custom";
  font-weight: normal;
  font-style: normal;
  src: url("../fonts/Literata-Regular.ttf");
}

@font-face {
  font-family: "literata-custom";
  font-weight: normal;
  font-style: italic;
  src: url("../fonts/Literata-Italic.ttf");
}

@font-face {
  font-family: "literata-custom";
  font-weight: bold;
  font-style: normal;
  src: url("../fonts/Literata-Bold.ttf");
}

@font-face {
  font-family: "literata-custom";
  font-weight: bold;
  font-style: italic;
  src: url("../fonts/Literata-BoldItalic.ttf");
}

body {
  font-family: "literata-custom", serif;
  font-size: 100%;
  font-weight: normal;
  font-style: normal;
}
And the HTML of a sample page:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en">
<head>
  <meta charset="utf-8"/>
  <title>Bubbles DeVere</title>
  <link rel="stylesheet" type="text/css" href="../styles/styles.css"/>
</head>

<body>

  <p>Champagne! Champagne for everyone!</p>

</body>
</html>
You can't get much more blank, but it still shows pseudo-italic for the regular text. Since the Sigil preview shows the text as intended (regular) I assume that there's a problem with Calibre. I currently don't have any other version handy but v3.48 since I'm bound to that due to the current environment.

So my question is, whether this is a known Calibre bug dedicated to some specific versions, or is this a wider spreading issue concerning other readers as well?
Slevin#7 is offline   Reply With Quote
Old 06-07-2025, 04:00 PM   #4
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: 79,501
Karma: 145863170
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
This is the first time I've seen such a problem reported with any version of calibre.

What happens if you take out the embedded fonts and select the font as the calibre viewer default font?
JSWolf is offline   Reply With Quote
Old 06-07-2025, 05:27 PM   #5
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Yeah, weird, right^^

When I set Calibre's default font to Literata, Calibre shows the text as expected in regular style.

The system wide installed font Literata is the exact same font I've embedded in the eBook. So there seems to be no problem with displaying the font itself, it's just a problem when the font comes embedded. And it just affects the regular (normal) style, since italic seems to work as expected.
Slevin#7 is offline   Reply With Quote
Old 06-07-2025, 07:30 PM   #6
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Well, I've tried a bunch of different fonts and then stumbled by accident above the Liberation Font https://en.wikipedia.org/wiki/Liberation_fonts https://github.com/liberationfonts/liberation-fonts which worked without the mentioned skewing issue for regular style.

So upon further investigation, all the other fonts I've used so far were grabbed from Google Fonts (some back at 2020). This leads me to the assumption, that somewhat with Google provided fonts is causing the problem.

Unfortunately, I would only be interested in Lora and Literata as possible custom fonts, which both are Google fonts.

I don't think that anybody is still using Calibre 3.48, but the fact alone that this issue occurs will prevent me from putting one of these fonts into my eBooks.

If anybody has more information on this I'd be really glad to know what causes this issue and what fix could be applied.
Slevin#7 is offline   Reply With Quote
Old 06-08-2025, 01:26 AM   #7
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: 45,582
Karma: 168929301
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I've seen a similar issue reported with Bookerly and there it was traced to the Panose settings. OTOH, I don't see anything in the copy of Literata v3.103 I just downloaded from Google.

I generated a quick and dirty ePub from my Font Tester ePub with the Literata font embedded and it does not seem to have any issue with the renderers used in Sigil, calibre 8.4.101's ebook viewer, a couple of versions of ADE and Thorium. The file should be attached to this message. Could you give it a try and let me know if you seen any pseudo-italic issues.

Last edited by DNSB; 06-11-2025 at 09:03 PM. Reason: Removed file that I removed the embedded fonts from
DNSB is offline   Reply With Quote
Old 06-08-2025, 10:39 AM   #8
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by DNSB View Post
I generated a quick and dirty ePub from my Font Tester ePub with the Literata font embedded and it does not seem to have any issue...
Thank you for your effort, I really appreciate that. Your attached eBook unfortunately doesn't have embedded fonts, maybe you've mixed them up?

Because of that, Calibre displays your eBook font-wise correctly, since it uses the Literata font system wide installed.

I've taken the liberty of embedding the Literata (3.103) fonts to your book, with the usual weird outcome of skewed chars for regular style (normal and bold-normal).

Maybe you wanna take a quick look? Many thanks again.
Attached Files
File Type: epub Literata Font Test - Ann Onymous - Font embedded.epub (499.5 KB, 21 views)
Slevin#7 is offline   Reply With Quote
Old 06-08-2025, 12:05 PM   #9
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,711
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Slevin#7 View Post
Maybe you wanna take a quick look? Many thanks again.
I tested that last epub and it worked everywhere: Sigil, Readium, BibiReader, JSReader, Calibre Viewer (8.4.0), Thorium, even in Foliate for Linux. In all of these eReaders, italics are showed as true italics (that is, as expected).

Last edited by RbnJrg; 06-08-2025 at 04:52 PM.
RbnJrg is offline   Reply With Quote
Old 06-08-2025, 12:58 PM   #10
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by RbnJrg View Post
italics are showed as true italics (that is, as expected).
Italic was never the problem, it is that regular text (font-style: normal) is displayed as pseudo-italic, not even showing the proper italic font but skewing the text somehow.

Anyhow, if the eBook I've attached to my last post, and which has embedded fonts within, is shown properly on your tested devices I at least can rule out any false eBook configurations on my side. So the issue lies within fonts provided through Google Fonts in combination with some specific readers (at least in combination with Calibre ebook-viewer 3.48).

Thank you RbnJrg.

If anybody has any further information on this issue I'd be really interested to hear them.

Cheers and have a nice weekend everyone
Slevin#7 is offline   Reply With Quote
Old 06-08-2025, 03:21 PM   #11
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: 79,501
Karma: 145863170
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
There is another solution. Upgrade your Windows to Windows 10 64-bit.
JSWolf is offline   Reply With Quote
Old 06-08-2025, 04:33 PM   #12
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by JSWolf View Post
There is another solution. Upgrade your Windows to Windows 10 64-bit.
This is not the solution for me trying to understand why this issue happens. I'm pretty sure most of the reader will display the font properly, so in general I think it should be safe to use Literata from Google Fonts.

However, there is a specific setup, which causes problems, and as someone who wants to understand why this is, I can't just turn around and play hide-and-seek games, where the problem disappears the second it's out of sight^^.

The issue is still there, at least in some specific setups.
Slevin#7 is offline   Reply With Quote
Old 06-08-2025, 04:42 PM   #13
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: 79,501
Karma: 145863170
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 Slevin#7 View Post
This is not the solution for me trying to understand why this issue happens. I'm pretty sure most of the reader will display the font properly, so in general I think it should be safe to use Literata from Google Fonts.

However, there is a specific setup, which causes problems, and as someone who wants to understand why this is, I can't just turn around and play hide-and-seek games, where the problem disappears the second it's out of sight^^.

The issue is still there, at least in some specific setups.
If you post a sample ePub with the embedded font, I'll try it in the latest calibre with Windows 11 and let you know how it displays.
JSWolf is offline   Reply With Quote
Old 06-08-2025, 04:51 PM   #14
Slevin#7
Enthusiast
Slevin#7 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by JSWolf View Post
If you post a sample ePub with the embedded font, I'll try it in the latest calibre with Windows 11 and let you know how it displays.
Thanks JSWolf, the link is from the attachment above (didn't want to double upload it):
https://www.mobileread.com/forums/at...hmentid=216076
Slevin#7 is offline   Reply With Quote
Old 06-08-2025, 04:55 PM   #15
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: 79,501
Karma: 145863170
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 Slevin#7 View Post
Thanks JSWolf, the link is from the attachment above (didn't want to double upload it):
https://www.mobileread.com/forums/at...hmentid=216076
Here is how it looks on the current calibre.

Click image for larger version

Name:	Screenshot 2025-06-08 215507.jpg
Views:	25
Size:	319.8 KB
ID:	216098
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change italic font to regular? butterbeer Editor 2 12-24-2019 07:03 PM
What Custom Columns do you use in your Calibre Media Library(movies, tv shows, anime) Inukami Library Management 1 07-17-2018 12:24 PM
Custom fonts - naming for bold, italic, etc gers1978 Amazon Kindle 1 07-17-2018 06:24 AM
Aura How not to use an italic font? ohho Kobo Reader 2 03-07-2017 06:17 AM
Embeded Italic font not rendered theducks Sigil 6 11-07-2012 07:25 AM


All times are GMT -4. The time now is 06:03 AM.


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