09-10-2024, 06:51 PM | #1 |
Gentleman and scholar
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> Code:
.ef { font-family: "Verdana", "Helvetica", "Arial", "Ubuntu", sans-serif; font-style: normal; font-weight: normal } 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. |
09-10-2024, 07:12 PM | #2 |
Grand Sorcerer
Posts: 12,774
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.
|
Advert | |
|
09-10-2024, 07:14 PM | #3 |
Wizard
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.
|
09-10-2024, 07:38 PM | #4 |
Gentleman and scholar
Posts: 11,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, Paperwhite 3
|
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.
|
09-10-2024, 07:43 PM | #5 |
Wizard
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.
|
Advert | |
|
09-10-2024, 08:00 PM | #6 |
Bibliophagist
Posts: 40,618
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). |
09-11-2024, 03:55 AM | #7 | |
Gentleman and scholar
Posts: 11,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, Paperwhite 3
|
Quote:
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. |
|
09-11-2024, 04:03 AM | #8 |
Gentleman and scholar
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?
|
09-11-2024, 10:36 AM | #9 |
Gentleman and scholar
Posts: 11,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, Paperwhite 3
|
|
09-11-2024, 04:21 PM | #10 | |
Resident Curmudgeon
Posts: 76,510
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
09-11-2024, 05:58 PM | #11 |
Wizard
Posts: 1,440
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
|
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.
|
09-11-2024, 06:39 PM | #12 |
Bibliophagist
Posts: 40,618
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. |
09-11-2024, 08:33 PM | #13 | |
Gentleman and scholar
Posts: 11,360
Karma: 110455811
Join Date: Jun 2015
Location: Space City, Texas
Device: Clara BW; Nook ST w/Glowlight, Paperwhite 3
|
Quote:
I have seen some very poorly formatted books in my time. |
|
09-11-2024, 11:23 PM | #14 |
Bibliophagist
Posts: 40,618
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
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.
|
09-12-2024, 06:40 AM | #15 |
Resident Curmudgeon
Posts: 76,510
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
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 |