Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 05:51 PM   #1
ZodWallop
Gentleman and scholar
ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.
 
ZodWallop's Avatar
 
Posts: 11,237
Karma: 110205705
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara HD; Nook ST w/Glowlight, (2015) Glowlight Plus, Paperwhite 3
Nickel won't display secondary font in body text

I'm reading a book (The Bright Lands by John Fram) that has a lot of text messages and emails that are supposed to display as sans serif, but Kobo seems to be ignoring that.

I've attached a picture of Nickle displaying the text.

Here is the code from the book:
Code:
<p class="body-text"><span class="ef"><span class="koboSpan" id="kobo.24.1">actually it’s not ok.</span></span></p>
			<p class="body-text"><span class="koboSpan" id="kobo.25.1">Joel tried to call. </span><span class="koboSpan" id="kobo.25.2">It went to voice mail after two rings.</span></p>
			<p class="body-text"><span class="ef"><span class="koboSpan" id="kobo.26.1">can’t talk rn</span></span><span class="koboSpan" id="kobo.27.1">, his brother wrote. </span><span class="ef"><span class="koboSpan" id="kobo.28.1">sorry.</span></span></p>
			<p class="body-text"><span class="ef"><span class="koboSpan" id="kobo.29.1">Lil D</span></span><span class="koboSpan" id="kobo.30.1">, Joel wrote — an old pet name that felt rusty from disuse — </span><span class="ef"><span class="koboSpan" id="kobo.31.1">What’s wrong?</span></span></p>
			<p class="body-text"><span class="ef"><span class="koboSpan" id="kobo.32.1">dumb dreams. </span><span class="koboSpan" id="kobo.32.2">bad dreams. </span><span class="koboSpan" id="kobo.32.3">i’m stupid.</span></span></p>
The class "ef" is supposed to display a different font. Here is the code from the style sheet:
Code:
.ef {
    font-family: "Verdana", "Helvetica", "Arial", "Ubuntu", sans-serif;
    font-style: normal;
    font-weight: normal
    }
I added the "Ubuntu" bit because that is a font installed on my Clara BW. I then downloaded and added Arial. Still no joy.

Other changes to the stylesheet do work. The body text was set to left and I changed it to justify. That worked.

Also, in Sigil, the different font does display. So it's just Nickle.

I'm travelling (I'm posting this from SeaTac airport). So I can edit the book in Sigil until my flight boards. But I can't do A/B testing with an ePub vs. kepub or see how calibre displays it right now.
Attached Thumbnails
Click image for larger version

Name:	PXL_20240910_213451850.jpg
Views:	44
Size:	863.3 KB
ID:	210737  
ZodWallop is offline   Reply With Quote
Old Yesterday, 06:12 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,569
Karma: 74358018
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Dumb question but is the font setting on the device "Publisher Default"? If not I believe all fonts in the book will be overridden.
PeterT is offline   Reply With Quote
Advert
Old Yesterday, 06:14 PM   #3
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,349
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
Are you reading EPUB or KEPUB? Unless you select the publisher's font on KEPUB, your chosen font gets used for everything, and all font changes in the CSS get ignored.
Aleron Ives is offline   Reply With Quote
Old Yesterday, 06:38 PM   #4
ZodWallop
Gentleman and scholar
ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.
 
ZodWallop's Avatar
 
Posts: 11,237
Karma: 110205705
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara HD; Nook ST w/Glowlight, (2015) Glowlight Plus, Paperwhite 3
Quote:
Originally Posted by PeterT View Post
Dumb question but is the font setting on the device "Publisher Default"? If not I believe all fonts in the book will be overridden.
Nope. And changing that fixed it. I don't like that setting for kepub. I would prefer changing the font to just change the body text, But calls for special cases should be respected.
ZodWallop is offline   Reply With Quote
Old Yesterday, 06:43 PM   #5
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,349
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
You can adjust the behaviour with the "Un-Force user font-family in KePubs" patch, if you so desire.
Aleron Ives is offline   Reply With Quote
Advert
Old Yesterday, 07:00 PM   #6
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,157
Karma: 153098470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I took a quick look at your book but did not see where you used an @fontface to link the font in the fonts directory to your ebook. I haven't tried that in a while but did remember having to do this a few years back.

I tried this and epub had not issue while kepub did require publisher default to show the alternate font. I've attached the epub with the @fontface bits and a couple of screenshots (1st is the epub, 2nd is the kepub).
Attached Thumbnails
Click image for larger version

Name:	screen_002.png
Views:	32
Size:	44.2 KB
ID:	210742   Click image for larger version

Name:	screen_003.png
Views:	29
Size:	65.2 KB
ID:	210743  
Attached Files
File Type: epub Tester.epub (192.2 KB, 9 views)
DNSB is offline   Reply With Quote
Old Today, 02:55 AM   #7
ZodWallop
Gentleman and scholar
ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.
 
ZodWallop's Avatar
 
Posts: 11,237
Karma: 110205705
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara HD; Nook ST w/Glowlight, (2015) Glowlight Plus, Paperwhite 3
Quote:
Originally Posted by DNSB View Post
I took a quick look at your book but did not see where you used an @fontface to link the font in the fonts directory to your ebook.
I'm home now and opened the actual purchased ePub and you're right. It doesn't have the @fontface links. However, switching the kepub to Publisher Default does now correctly display those fonts as sans serif.

I'm moving away from patches. For the most part Kobo's firmware is good enough without (well, I still use better hyphenation dictionary).

I do think I'll test the "Un-Force user font-family in KePubs" patch Aleron mentioned, as I don't like whatever the default Serif font is as much as I like Literata Book.
ZodWallop is offline   Reply With Quote
Old Today, 03:03 AM   #8
ZodWallop
Gentleman and scholar
ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.
 
ZodWallop's Avatar
 
Posts: 11,237
Karma: 110205705
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara HD; Nook ST w/Glowlight, (2015) Glowlight Plus, Paperwhite 3
In the "Un-Force user font-family in KePubs", aside from changing enabled to yes, do I need to do anything with alternatives 1-3?
ZodWallop is offline   Reply With Quote
Old Today, 09:36 AM   #9
ZodWallop
Gentleman and scholar
ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.ZodWallop ought to be getting tired of karma fortunes by now.
 
ZodWallop's Avatar
 
Posts: 11,237
Karma: 110205705
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara HD; Nook ST w/Glowlight, (2015) Glowlight Plus, Paperwhite 3
Quote:
Originally Posted by ZodWallop View Post
In the "Un-Force user font-family in KePubs", aside from changing enabled to yes, do I need to do anything with alternatives 1-3?
Alternative 1 seems to be working well enough out of the box.
ZodWallop is offline   Reply With Quote
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
Preferred Publisher Font for Body Text? DreamWriter Amazon Kindle 12 07-25-2012 04:15 AM
Change body text font from bld to normal Jackdusty Conversion 4 03-17-2011 01:21 PM
Pixel Qi 10" display will be sold as USB powered Secondary Display Dulin's Books News 8 09-28-2010 06:15 PM
Installed Dingbat font won't display in Firefox autumnmoon Workshop 3 12-22-2009 10:57 AM


All times are GMT -4. The time now is 11:23 AM.


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