Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-07-2017, 10:34 AM   #1
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Epub displays normally on Mac, but in all italics on Windows?

Does anyone have any idea about how I can solve an epub which displays normally on Calibre Mac, iBooks (Mac), iBooks (iPad), Kindle etc, but display in all italics on Calibre Windows (8 and 10)?

Sadly I cannot post the book here, but it is markdown via Pandoc and looks good elsewhere, any pointer appreciated.

It uses custom fonts and the CSS (snippet below) looks OK.

Code:
@font-face {
  font-family: "Vollkorn-SemiBold";
  src: url("../fonts/Vollkorn-SemiBold.ttf");
  font-weight: bold;
  font-style: normal;
}

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

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

body{
  font-family: "Vollkorn-Regular";
  font-size: 0.9em;
  line-height: 1.3;
}

h1, h2, h3, h4, h5, h6,  {
  font-family: "Vollkorn-SemiBold";
  margin-top: 2em;

b, strong {
  font-family: "Vollkorn-SemiBold";
}

em, cite {
  font-family: "Vollkorn-Italic";
}
.....
Russ is offline   Reply With Quote
Old 11-07-2017, 11:57 AM   #2
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Does your Windows have the very latest version (4.015) of that font from http://vollkorn-typeface.com/ ? If so, try reinstalling it anyway.
DaltonST is offline   Reply With Quote
Advert
Old 11-07-2017, 12:13 PM   #3
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Quote:
Originally Posted by DaltonST View Post
Does your Windows have the very latest version (4.015) of that font from http://vollkorn-typeface.com/ ? If so, try reinstalling it anyway.
Hi DaltonST, thanks for your thoughts... they are probably not the latest fonts, they were from Google Fonts originally, I can update them from the font website on my local machine and re-embed them in the ebook. But I did not think that the fonts needed to be installed on the ebook reader device, as they are in the ebook? I don't have these fonts on my iPad or iPhone for example, but they display just fine in the book.
Russ is offline   Reply With Quote
Old 11-07-2017, 03:20 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Russ
the font family is normally the base name (typically 4 members)

Font-weight, font style the cause Usage, the match the declaration in the @ fonts

By default H# are bold
the <i> tag will use the italic version of the current family, same for <b>
No need for different family names for the different weights/strokes The @font sets what to use
theducks is offline   Reply With Quote
Old 11-08-2017, 03:00 AM   #5
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Quote:
Originally Posted by theducks View Post
Russ
the font family is normally the base name (typically 4 members)
Font-weight, font style the cause Usage, the match the declaration in the @ fonts...
Hi theducks, many thanks for your reply. I'm now a little confused, the way I have laid it out is the way it would work with normal css and oddly it works in all the devices I have apart from Calibre in Windows. I think you are suggesting something like this?

Code:
@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/Vollkorn-SemiBold.ttf");
  font-weight: bold;
  font-style: normal;
}

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

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

body{
  font-family: "Vollkorn";
  font-size: 0.9em;
  line-height: 1.3;
}
I will give it a go and report back
Russ is offline   Reply With Quote
Advert
Old 11-08-2017, 06:11 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's impossible to say just looking at a stylesheet, there are many other factors that come into play. Use the scramble ebook plugin and post the book or the editor and delete all extraneous content, leaving enough to demonstrate the issue and post that.
kovidgoyal is offline   Reply With Quote
Old 11-08-2017, 08:42 AM   #7
Larla
Addict
Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.Larla ought to be getting tired of karma fortunes by now.
 
Larla's Avatar
 
Posts: 281
Karma: 5262189
Join Date: Dec 2011
Location: Katy, TX
Device: Samsung Tab S5E 12" Tablet
Is it normal to spell normal as "nomral" or is that Abbe Normal?
Larla is offline   Reply With Quote
Old 11-08-2017, 09:18 AM   #8
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Larla View Post
Is it normal to spell normal as "nomral" or is that Abbe Normal?
Title fixed.
pdurrant is offline   Reply With Quote
Old 11-08-2017, 10:34 AM   #9
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Quote:
Originally Posted by kovidgoyal View Post
It's impossible to say just looking at a stylesheet, there are many other factors that come into play. Use the scramble ebook plugin and post the book or the editor and delete all extraneous content, leaving enough to demonstrate the issue and post that.
Firstly, thanks to everyone for all their help. Here is a test epub which has the same characteristics. It's in a zip with some screen shots of devices.

http://download.shoesforindustry.net.../test-epub.zip

Last edited by Russ; 11-08-2017 at 01:30 PM.
Russ is offline   Reply With Quote
Old 11-08-2017, 10:56 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That link does not work for me, SSL error, I suggest just attaching the file here.
kovidgoyal is offline   Reply With Quote
Old 11-08-2017, 01:33 PM   #11
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Sorry, it should have been http no https, the link is fixed now. Not sure how you attach a file to this forum?
Russ is offline   Reply With Quote
Old 11-08-2017, 01:41 PM   #12
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Linked file attached. (Go Advanced/Manage Attachments)
Attached Files
File Type: zip test-epub.zip (3.02 MB, 75 views)
pdurrant is offline   Reply With Quote
Old 11-08-2017, 03:17 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Russ View Post
Not sure how you attach a file to this forum?
Quote:
Originally Posted by pdurrant View Post
Go Advanced/Manage Attachments
Or click the paper-clip icon in Advanced mode top tool bar

BR
BetterRed is online now   Reply With Quote
Old 11-08-2017, 09:42 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It looks like Qt WebKit on windows doesn't like this font. You can see this for yourself by right clicking on any text, choosing "Inspect Element" then going to the Resources tab and then Frames->HTML file->Fonts and click on the three fonts, you will see that both the regular and italic variants are rendered as italic for some reason. Historically, Qt on windows has had issues with fonts that use a CFF table internally, although that was fixed a while ago.

This should automatically be fixed when calibre updates its version of Qt Webkit, but until then, I'm afraid there's not much that can be done, sorry.
kovidgoyal is offline   Reply With Quote
Old 11-09-2017, 03:11 AM   #15
Russ
Junior Member
Russ began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2005
Device: XDA II
Kovid, many thanks for your efforts, I do appreciate them. As I understand it, the book fonts are OK, apart from when viewed with app on Windows which uses a particular version of Qt, where they display as italic?

I appreciate you are probably very busy, but do you have any idea when Calibre might update it's Qt version?
Russ is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converted epub displays italics incorrectly on Moon Reader dtc87 Conversion 18 07-26-2017 07:15 PM
EPUB Audio works on Calibre Mac but not Calibre Windows BrianHanifin Devices 3 10-21-2012 09:32 PM


All times are GMT -4. The time now is 12:17 AM.


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