06-13-2020, 07:30 AM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2020
Device: Kindle Paperwhite and iPad Pro
|
Embedding font breaks font-family?
Hi there,
I have a pdf book I bought and converted to azw3 via Amazon and calibre. I'm spending some time using calibre to clean up the formatting before I start reading it, but I'm running into a strange problem when trying to embed a custom font - embedding a font seems to break font-family from working. I've successfully tested the following for using a different font for sub-chapters: Code:
h1.part-title { font-family: "Courier New", Courier, monospace; font-size: 1rem; margin-top: 2em; margin-bottom: 1.5em; text-align: center; text-indent: 0; } I don't even need to add @font-family or apply it to the h1.chapter-title part of the css - simply adding the font to the ebook and add it to kindle, the subchapters go back to the normal font. (I had initially added the font, added the @font-family to the css, and specified it in the h1.chapter section of the css, but had that problem; the part-title wouldn't format correctly until I completely removed the ttf). I should note that it all displays perfectly in the calibre editor when I add the font and code. I'm using a ttf, but have also tried an otf. I thought it might be something with this specific font, so I downloaded an open source font from google fonts, and the same thing happens when adding it to the ebook. Am I missing something simple here? Using a Kindle Paperwhite on firmware 5.12.4. Thanks! |
06-13-2020, 11:48 AM | #2 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jun 2020
Device: Kindle Paperwhite and iPad Pro
|
Huh, I worked it out. I wanted to try installing the font directly on the Kindle in the fonts folder to see whether I could at least select it as the main font for the book and noticed a new 'publisher font' option I couldn't remember seeing before. I selected that and the Kindle then used the font embedded in the ebook for the chapter H1s and the Kindle courier font for the part H1s as set in the css.
So it seems if you open an ebook with an embedded font on the kindle: 1) the kindle disables all font choices set within the ebook -- even those built-in to the kindle that would otherwise be respected if no fonts were embedded -- unless 2) you manually tell the kindle to use the 'publisher font' Seems a bit strange. I wonder how many of my other ebooks I've read 'vanilla' that actually have custom fonts embedded that were ignored since I didn't explicitly tell the kindle to use the 'publisher font' for the book. :-/ |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding font in books that already have embedded font | Barty | Calibre | 2 | 10-16-2013 11:38 PM |
Font Embedding? | teh603 | Writer2ePub | 75 | 01-08-2013 07:57 PM |
Font embedding | sachin | Sigil | 36 | 03-30-2012 03:26 AM |
Font embedding | sachin | Sigil | 3 | 03-21-2012 09:19 AM |
Do I need a font license if all I'm doing is referring to the font (not embedding)? | Stodder | Workshop | 21 | 04-21-2011 04:19 AM |