Register Guidelines E-Books Search Today's Posts Mark Forums Read

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: 655
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 09-15-2024, 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: 445
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 online now   Reply With Quote
Advert
Old 09-15-2024, 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,776
Karma: 154147706
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 09-15-2024, 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: 445
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 online now   Reply With Quote
Old 09-15-2024, 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,776
Karma: 154147706
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
Old 09-17-2024, 09:21 AM   #6
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: 655
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
Looks like some spreadsheeting and more systematic experimentation in my future then

Thanks for the replies (and the Kindle publishing guidelines look very helpful too)
radius is offline   Reply With Quote
Old 09-17-2024, 09:50 AM   #7
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: 76,031
Karma: 134368292
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 nabsltd View Post
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.
I thought Kindles ignored embedded fonts unless you use Publisher Font.
JSWolf is offline   Reply With Quote
Old 09-17-2024, 09:51 AM   #8
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: 76,031
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@radius is this for eBooks for your own use or eBooks that are going to be for sale?

When I am editing eBooks with embedded fonts, I remove the body font as I don't need it. I may leave in other embedded fonts if I decide I like them. If they are sans-serif type and I don't want them, I'll remove them and change the CSS to font-family: sans-serif;. Also, if it's a serif type font, I may remove it and just use my choice of boy font.

Last edited by JSWolf; 09-17-2024 at 10:00 AM.
JSWolf is offline   Reply With Quote
Old 09-17-2024, 01:01 PM   #9
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: 445
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
Quote:
Originally Posted by JSWolf View Post
I thought Kindles ignored embedded fonts unless you use Publisher Font.
Modern Kindle software never ignores embedded fonts...they are used when properly referenced.

OTOH, if there is a font-family attribute in the styling for the body element, this is considered a "publisher font", and the Kindle uses it by default as the "body font". When reading a book with a "publisher font", "Publisher Font" is added to the list of fonts to choose from, and the user can switch to/from "Publisher Font" just like any other font in the list.

A book sent to Amazon via KDP (and possibly even Send to Kindle) has extra constraints about fonts during the conversion process, but the Kindle itself perfectly adheres to the CSS spec when encountering font-family pointing to an embedded font.
nabsltd is online now   Reply With Quote
Old 09-20-2024, 01:42 PM   #10
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: 76,031
Karma: 134368292
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 nabsltd View Post
Modern Kindle software never ignores embedded fonts...they are used when properly referenced.

OTOH, if there is a font-family attribute in the styling for the body element, this is considered a "publisher font", and the Kindle uses it by default as the "body font". When reading a book with a "publisher font", "Publisher Font" is added to the list of fonts to choose from, and the user can switch to/from "Publisher Font" just like any other font in the list.

A book sent to Amazon via KDP (and possibly even Send to Kindle) has extra constraints about fonts during the conversion process, but the Kindle itself perfectly adheres to the CSS spec when encountering font-family pointing to an embedded font.
Is this the way it is with KF8 and/or KFX?
JSWolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:45 AM.


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