Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded font ignored #41

Open
Eggheadbooks opened this issue Jun 12, 2018 · 6 comments
Open

Embedded font ignored #41

Eggheadbooks opened this issue Jun 12, 2018 · 6 comments

Comments

@Eggheadbooks
Copy link

I have an embedded font for select sections of my book, as well as one for a foreign glyph. On Kindle, the user can change the main font without affecting sections styled with an embedded font. I thought my Kobo Touch did the same thing, but now it does not. Do not know if this is a change with the updated O/S, or if my memory fails me and this was always the case. Either way, this is NOT good. Is this the case on all Kobos? Your documentation suggests it is.

@bdugas
Copy link
Contributor

bdugas commented Jun 13, 2018

@Eggheadbooks we can test this as well if you can provide a file. Can you also confirm whether this still happens when the font is set to "publisher default"?

@Eggheadbooks
Copy link
Author

Attached is a truncated copy of the file (it's not my book, so I have to respect the author), with just the problem sections (and a bit of surrounding text) included. You will see the text that utilizes the embedded font starting on line 25 of Section006.xhtml. On my Kobo Touch (recently updated firmware), if the user deselects Publisher's Font, the embedded font text also changes, not just the surrounding body text; the user must selected Publisher's Font to see the formatted text properly. (I don't recall this happening previously on my Kobo Touch, and it doesn't happen on Kindle.)

Secondly, if you select justified text, you will see that the centered text turns to left-aligned. The photo in Section0027 also changes to left-aligned. I also don't recall this happening in my Kobo Touch prior to the firmware upgrade.

Yes, I am testing with a kepub.epub.

Okay...I just tried to attach the ePub. Your system says the file type is unsupported (which is a bit odd, considering...). I've zipped it. Let me know if that doesn't work.
Test_kobo.kepub.zip

@bdugas
Copy link
Contributor

bdugas commented Jun 28, 2018

@Eggheadbooks just a note to say we're still looking at this and will follow up once we've tested across our platforms and discussed with our client teams.

@bdugas
Copy link
Contributor

bdugas commented Jul 5, 2018

@Eggheadbooks I can confirm that this behavior (user selected fonts overriding the embedded fonts) is consistent across our platforms. As a short term fix you could add a note to the front-matter indicating that the reader should select the "publisher default" font option to optimize the user experience. We're looking into a client side fix for this.

@bdugas
Copy link
Contributor

bdugas commented Jul 6, 2018

@Eggheadbooks last update for a bit. Our UX team is looking at this and we've logged the use cases and benefits. I can't estimate at present when the work will be scheduled but we understand the value and will prioritize accordingly.

@daniel-j
Copy link

daniel-j commented Sep 25, 2019

@bdugas kepub-book.css contains this: * { font-family: %1 !important; }
I think that is what forces the font everywhere, overriding any attempt to show an embedded font when Publisher Default is not selected. The selector * or the !important specifier should be changed/removed.

A suggestion is to do what the Adobe RMSDK EPUB renderer does: body, p { font-family: %1 !important; }
This will set the font on everything but can still be overridden by the ebook's css, for example when a programming book embeds a monospaced font for <pre>, <code> etc.
(yes, it's 2019 and Kobo ereaders still doesn't come with a monospace font-family)

Currently this also makes glyph fonts unusable when the user changes font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants