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 09-10-2024, 06: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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, 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:	78
Size:	863.3 KB
ID:	210737  
ZodWallop is offline   Reply With Quote
Old 09-10-2024, 07: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,773
Karma: 75003038
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 09-10-2024, 07: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,440
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 09-10-2024, 07: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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, 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 09-10-2024, 07: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,440
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 09-10-2024, 08: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: 40,617
Karma: 157444382
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:	68
Size:	44.2 KB
ID:	210742   Click image for larger version

Name:	screen_003.png
Views:	62
Size:	65.2 KB
ID:	210743  
Attached Files
File Type: epub Tester.epub (192.2 KB, 27 views)
DNSB is offline   Reply With Quote
Old 09-11-2024, 03: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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, 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 09-11-2024, 04: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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, 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 09-11-2024, 10: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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, 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
Old 09-11-2024, 04:21 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,510
Karma: 136565392
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 ZodWallop View Post
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.
A lot of purchased eBooks have fonts listed (for in use classes) in the CSS that are not embedded.
JSWolf is offline   Reply With Quote
Old 09-11-2024, 05:58 PM   #11
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,440
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
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?
You only need to comment out alternative 1 and un-comment alternative 2 or 3 if you find that alternative 1 does not give high enough preference to the publisher's font.
Aleron Ives is offline   Reply With Quote
Old 09-11-2024, 06:39 PM   #12
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: 40,617
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I was just editing one ePub that had a font-family line with 7 named fonts and serif for every bloody block level style. Also a mass of inherited items repeated in those entries. Removing the unneeded duplicates shortened the CSS from 2014 lines to 240 lines. This also reduced many entries to blank entries which were removed.

Oddly, most of the fonts seemed to be Android oriented, Droid Serif, Roboto Serif, Noto Serif, Georgia, Times New Roman are the five I remember off the top of my head.
DNSB is offline   Reply With Quote
Old 09-11-2024, 08:33 PM   #13
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,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, Paperwhite 3
Quote:
Originally Posted by DNSB View Post
I was just editing one ePub that had a font-family line with 7 named fonts and serif for every bloody block level style. Also a mass of inherited items repeated in those entries. Removing the unneeded duplicates shortened the CSS from 2014 lines to 240 lines. This also reduced many entries to blank entries which were removed.

Oddly, most of the fonts seemed to be Android oriented, Droid Serif, Roboto Serif, Noto Serif, Georgia, Times New Roman are the five I remember off the top of my head.
I wonder if it's because the Google fonts are freely available?

I have seen some very poorly formatted books in my time.
ZodWallop is offline   Reply With Quote
Old 09-11-2024, 11:23 PM   #14
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: 40,617
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ZodWallop View Post
I wonder if it's because the Google fonts are freely available?

I have seen some very poorly formatted books in my time.
Probably. For this ebook, my first thought was that someone thought Vellum didn't create complex enough CSS. Oddly, the formatting wasn't that bad, just that the CSS was ridiculously overcomplex.
DNSB is offline   Reply With Quote
Old 09-12-2024, 06:40 AM   #15
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,510
Karma: 136565392
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 DNSB View Post
Probably. For this ebook, my first thought was that someone thought Vellum didn't create complex enough CSS. Oddly, the formatting wasn't that bad, just that the CSS was ridiculously overcomplex.
Maybe whoever did the formatting also works for StandardEBOOKS.
JSWolf 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 11:52 PM
Preferred Publisher Font for Body Text? DreamWriter Amazon Kindle 12 07-25-2012 05:15 AM
Change body text font from bld to normal Jackdusty Conversion 4 03-17-2011 02:21 PM
Pixel Qi 10" display will be sold as USB powered Secondary Display Dulin's Books News 8 09-28-2010 07:15 PM
Installed Dingbat font won't display in Firefox autumnmoon Workshop 3 12-22-2009 11:57 AM


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


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