Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-31-2017, 07:21 AM   #1
leigh_4
Junior Member
leigh_4 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2017
Device: None
Unhappy docx to epub: sans-serif recognised, then not recognised

I'm working on a book that's mostly set in serif font (Book Antiqua, 10pt), with some passages set in sans-serif (Helvetica, 9.5pt) to spotlight them.

When I view the epub it in Calibre's reader, all looks as it should; but in iBooks, the sans-serif falls over half way through; i.e. it's fine in the first half, but later on, identically formatted (sans-serif) text is rendered as serif!

Any one know why this is happening? Or how I can fix this?!
leigh_4 is offline   Reply With Quote
Old 03-31-2017, 07:44 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by leigh_4 View Post
Any one know why this is happening? Or how I can fix this?!
Without seeing the CSS file(s) and the relevant HTML code, it'll hard to narrow down this problem.

You can try the following:

1. Check the epub with the IDPF Validator.
2. Check the CSS file(s) with CSS Lint.
Doitsu is offline   Reply With Quote
Advert
Old 03-31-2017, 09:14 AM   #3
leigh_4
Junior Member
leigh_4 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2017
Device: None
Thanks for replying.

This is an example of Calibre's html:

<body class="calibre">

<p class="block_71">Maybe it’s the first morning that you wake up and notice the birdsong and the blue sky instead of a familiar sense of dread. Or it might be the moment after a laughter-filled chat with a friend when he or she says, ‘You know, you seem different. More like your old self.’ Or perhaps the world simply seems brighter, funnier, more inviting.</p>

And the corresponding css (I've changed the sans-font to Arial, which bizarrely fixed some of it, but not all.):

.calibre {
color: #000;
display: block;
font-family: "Book Antiqua", serif;
font-size: 1em;
padding-left: 0;
padding-right: 0;
margin: 0 5pt
}

.block_71 {
color: black;
display: block;
font-family: "Arial", sans-serif;
line-height: 1.2;
text-align: justify;
padding: 0;
margin: 0
}

And the attached screenshot shows how it appears in iBooks.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2017-03-31 at 13.09.01.png
Views:	301
Size:	30.9 KB
ID:	155892  
leigh_4 is offline   Reply With Quote
Old 03-31-2017, 12:05 PM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
@leigh_4: I wasn't able to replicate this problem with an older iBooks for iOS version.

Last edited by Doitsu; 03-31-2017 at 12:41 PM.
Doitsu is offline   Reply With Quote
Old 03-31-2017, 04:19 PM   #5
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Are you sure there are not other CSS entries in the files themselves. They will override the CSS file settings. Are the changes related to different files in the book?
DaleDe is offline   Reply With Quote
Advert
Reply

Tags
epub, font, ibooks, sans-serif, serif


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to azw3 and mobi conversion not recognised by Kindle knorris Conversion 2 11-01-2016 07:31 PM
Force epub to sans-serif? truth1ness Calibre 1 06-25-2015 11:47 PM
DR1000 ePub not recognised on RC2 Groen iRex 3 06-30-2010 04:13 AM
Serif and Sans-Serif fonts in Libprs500 benong Calibre 1 02-06-2008 05:43 AM
Do you prefer the Reader's serif or its sans serif font? (poll) Alexander Turcic Sony Reader 9 11-25-2006 01:15 PM


All times are GMT -4. The time now is 01:26 AM.


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