10-14-2017, 04:13 AM | #1 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Unchangeable font
I have epubs that I edit in Sigil, then create an AZW using the kindlegen plugin, then sideload to my PW3.
I've noticed that some books the Kindle would not allow me to change the font: if I pulled up the font menu, I could select whatever I wanted, but the display did not change. I stripped down the epub to try to work out the reason. Eventually I got a to a stylesheet with one style: Code:
p { font-family: sans-serif; } Same behaviour if I had Code:
body { font-family: sans-serif; } I attach the test epub. But many other epubs I have use "font-family:", and the display font can be changed regardless. Anyone can cast a light on what is going on and what triggers this behaviour? I normally do put "font-family: serif;" in the body CSS as I found that otherwise if I had some text in an embedded font (e.g a Fraktur for a few words), and set "Publisher Font" on to see it, all other text became sans otherwise (ugh). I really would prefer it if you could choose the "font unspecified" display font while leaving the explicitly set ones to show. But I don't see any prospect of that. |
10-14-2017, 04:06 PM | #2 |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
My understanding is that if you want to embed a font to be used for the main body of the book, a "Publisher font", you should set that as the font family of the body element and no where else. That allows it to be overridden by the user's selection.
You should not set a font family any place else, except where you want to use a font that you have included in the book for certain specific text, such as fancy headings. Regular paragraphs in the book should not have a font family set. Last edited by jhowell; 10-14-2017 at 04:27 PM. |
Advert | |
|
10-14-2017, 04:20 PM | #3 | |
Resident Curmudgeon
Posts: 75,892
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-14-2017, 07:28 PM | #4 | ||
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
@Alan: it's not the CSS, and what it says--it's WHERE it's called. The same CSS you've listed, for the serif body font, will be perfectly meaningless in one place, and perfectly iron-clad in the unchangeable category, if placed on the p tag. Thus, it's the where, not the CSS itself. Does that make sense? Hitch |
||
10-15-2017, 01:03 AM | #5 | ||
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
But I tried again: if CSS; p { font-family: sans-serif; } -- font is locked. If body { font-family: sans-serif; } -- font is not locked. Quote:
I would expect that if anything would lock the font it would be "body", since that contains everything else. But not so, apparently How about the related issue: If I have an embedded font for some display text, and to make the embedded font show you have to choose "Publisher Font" on Kindle. That made the body text sans for some stupid reason (surely the default is serif?), so I put "font-family:serif" in the body css. But that forced it to Bookerly. No way for the user to choose one of the other system fonts like Baskerville. I assume I could choose Palatino, Baskerville, etc. in my css, but again that leaves the reader stuck with my choice of body text. Which is better than sans but still not ideal. Kindle is convenient but I miss the variety of layout of actual books and after a couple of months of just Bookerly it was palling, so I'm currently alternating between Bookerly and Baskerville for my own reading. So I don't like to take the choice away. I'm beginning to see why some publishers just use images for special text rather than wrestle with this. |
||
Advert | |
|
10-15-2017, 01:30 AM | #6 | ||||
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Quote:
Hitch |
||||
10-15-2017, 11:44 AM | #7 | |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
I have a book with CSS like: Code:
body {font-family: serif; } @font-face { font-family: 'Fraktur'; font-weight: normal; font-style: normal; src: url('../Fonts/OldEng.ttf'); } .Fraktur { font-family: 'Fraktur', serif; font-style: normal; } <span class="Fraktur">Christmas Greetings!</span> I can choose a font on Kindle, but then the Fraktur style doesn't show. If I choose "publisher font" then everything else becomes Bookerly. So the reader can choose the body font, at the cost of screwing up the display text. Is that what you meant? |
|
10-15-2017, 02:25 PM | #8 |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I suspect that the "body {font-family: serif; }" is causing the problem. You should not need this.
|
10-15-2017, 02:59 PM | #9 | |
Resident Curmudgeon
Posts: 75,892
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-15-2017, 06:39 PM | #10 | |||
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
If you don't care what the reader does, with the body, you should remove the body font tag. No reason for it, unless you want to force the body font to be serif (and NOT sans serif on the KF8 eInks). If you do want the body font to be other than sans, then keep the body font declaration. Secondly, don't use spans to create the font for the Fraktur. Apply it to the correct classes, e.g, p.Fraktur, h1.fraktur, or whatever you're going to call them. There's a definite, not-yet-fully-understood issue with fonts on Spans, in MOBI format. For one thing, there's a limit to the number of spans. I'm not sure that it's what's affecting your book, but it absolutely, positively exists. Quote:
Quote:
It's the devil's choice--the devil and the deep blue sea, but my feeling is that given as all the studies have clearly shown that serif is the better choice for reading comprehension, at least choose on the side of serif as the forced choice. Someone else is, of course, free to make their own choices. One last n.b.: you should consider using an otf for that use, rather than ttf. That's likely not related to the issues you're having, but IME, otf works better overall. Hitch |
|||
10-15-2017, 06:41 PM | #11 | |
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
You're not reading the thread closely, sweetie. He wants the Fraktur, and it was I who told him to use the body font declaration, for the reasons I've listed. You're right in that he doesn't have to use it, but if he doesn't, the KF8 eInks will all force the reader to view the body in sans-serif. And the main font on the body tag is, amazingly enough, the Tao of Amazon. Right there in the last few PG's. Hitch |
|
10-15-2017, 08:44 PM | #12 | |
Resident Curmudgeon
Posts: 75,892
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Last edited by JSWolf; 10-15-2017 at 08:47 PM. |
|
10-15-2017, 09:55 PM | #13 | |
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
10-15-2017, 11:09 PM | #14 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
|
10-15-2017, 11:46 PM | #15 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Your book should display any of the built-in fonts selected by the user for the main text. It should also show your embedded font in the limited places it is used, regardless of which main font the user has chosen. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura If epubs open at all, fonts unchangeable | kobospice | Kobo Reader | 32 | 06-10-2016 02:19 AM |
How to converse bold font into normal font output in calibre? | Percivale | Kobo Reader | 3 | 11-09-2015 09:21 PM |
Mini advanced font settings ignored in one book - embedded font? | lordofazeroth | Kobo Reader | 4 | 09-20-2013 02:15 PM |
Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |
Classic Unchangeable font in some books? | boydcarts | Barnes & Noble NOOK | 4 | 08-23-2010 07:09 PM |