Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2024, 04:39 PM   #1
radius
Lector minore
radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.
 
radius's Avatar
 
Posts: 654
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
Body font best practice for flexibility

I'm looking for some help on editing books so I can display the text in either the embedded, publisher font, or else in a user chosen font.

It often annoys me when epub books lock you into a particular font face and font size. I'm capable of editing epubs with Sigil and editing body tags or div and paragraph tags.

But I can't seem to figure out the rules for what "publisher font" even means on Kindle and Kobo. I find that if fonts are embedded and used for the main text (ie: not just titles or limited, special formatting) then I usually can't change it on the reader.

Is there a tutorial on this somewhere? I thought I saw something relevant in the wiki years ago, but can't dig it up again.

What I want:

- to have a base epub as my archival copy. I usually read on a Kobo Aura One. When I am on my Kindle Paperwhite, I use Calibre to convert on sending to the device
- to have the option to use whatever font face and font size the publisher chose for the main text
- to also have the option to choose my own font and size on the fly
radius is offline   Reply With Quote
Old Yesterday, 02:01 PM   #2
nabsltd
Evangelist
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 439
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
Quote:
Originally Posted by radius View Post
- to have the option to use whatever font face and font size the publisher chose for the main text
Don't even bother with this. 99% of the time, setting the font that is used for the majority of the book is the wrong thing to do. Publishers might want to try to match the physical book, but without full control over the exact layout of the book (which is impossible for reflowable ebooks), it's just not going to work. Fonts on paper look much different from fonts on displays (regardless of the display technology).

In addition, there are so many different reading apps out there, and they all handle "body fonts" differently, even in the same app. For example, a KFX file created from an EPUB allows you to use a font-family attribute set to an embedded font in the body element, and the person reading can choose to use this (by picking "Publisher Font"), or can change it to one of the built-in fonts. I do not know if KF8 files work the same way when delivered to a Kindle device.

Other reading software will completely ignore any font-family property in the styling of the html or body elements. So, some publishers add a font-family property to every CSS class to force the font. Doing this will not allow the Kindle to override the "publisher" font with a user-chosen font.

Since every good reading app allows the user to add fonts to the built-in list for picking a body font, just don't set any special font for the main body text, and let the user pick what they want.
nabsltd is offline   Reply With Quote
Advert
Old Yesterday, 02:10 PM   #3
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: 39,272
Karma: 153111226
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by nabsltd View Post
Other reading software will completely ignore any font-family property in the styling of the html or body elements. So, some publishers add a font-family property to every CSS class to force the font. Doing this will not allow the Kindle to override the "publisher" font with a user-chosen font.
If I remember correctly, KDP says that you can use a font-family to set the font in the body definition. Trying to add font-family to every class will result in the book being rejected by KDP.

See Text Guidelines - Reflowable for more on how Amazon wants fonts handled.
DNSB is offline   Reply With Quote
Old Yesterday, 09:06 PM   #4
nabsltd
Evangelist
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 439
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
Quote:
Originally Posted by DNSB View Post
If I remember correctly, KDP says that you can use a font-family to set the font in the body definition. Trying to add font-family to every class will result in the book being rejected by KDP.
That part I didn't know. I just tested by converting an EPUB to KFX using KFX Output plugin in Calibre. My Kindle could read it, but couldn't change the font.

I have some books where I have both the Amazon KF8 and an EPUB, and the EPUB has every class with a font-family, while the KF8 replaced it with a comment with just the font name. I assume the publisher made the change before uploading to KDP.
nabsltd is offline   Reply With Quote
Old Yesterday, 09:09 PM   #5
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: 39,272
Karma: 153111226
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Personally, I prefer to leave the body font up to the reader. I will use font-family for special cases such as monospace computer text and prettyifying text message conversations.
DNSB is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
font-family in <body> HTML or body{} CSS? enuddleyarbl ePub 22 10-14-2022 10:52 PM
Epub - best practice for base font size? Man Eating Duck ePub 11 10-10-2012 02:42 PM
Preferred Publisher Font for Body Text? DreamWriter Amazon Kindle 12 07-25-2012 04:15 AM
Logo font removal from PB360 body Font PocketBook 0 11-08-2010 03:55 PM
Change PDF body font size ufasoli PDF 11 10-18-2009 11:05 AM


All times are GMT -4. The time now is 02:20 AM.


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