01-19-2022, 11:27 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Using Google Fonts as fallback for Adobe Fonts
I created an EPUB using InDesign CC, and I selected the option of embedding fonts when exporting. Then, I deleted the unnecessary body fonts, and added another one manually (to the package, content.opf and CSS declaration). The EPUB contains now an Adobe font (encrypted) in some paragraphs as well as a Google font (non-encrypted, with free license). The Adobe font should be displayed in the apps supporting encryption (such as Apple Books and ADE), and the Google font, as fallback, in the ones not supporting encryption (e.g. Kindle).
After editing the EPUB, everything is fine in the Kindle Previewer, but I notice that the apps supporting encryption mix characters from both fonts. See attached image. Here is my CSS: Code:
@font-face { font-family:Quicksand; font-style:normal; font-weight:normal; src : url("../font/Quicksand-Regular.ttf"); } @font-face { font-family:VAGRundschriftD; font-style:normal; font-weight:normal; src : url("../font/VAGRundschriftD.otf"); } (...) p.Numero-capitulo2 { color:#39a2c4; font-family:VAGRundschriftD, Quicksand, sans-serif; font-size:3em; font-style:normal; font-variant:normal; font-weight:normal; line-height:1.2; margin-bottom:45px; margin-left:0; margin-right:0; margin-top:0; orphans:1; page-break-after:auto; page-break-before:always; text-align:right; text-decoration:none; text-indent:0; text-transform:none; widows:1; } I used the Google font version directly downloaded from the Google Font website (and I did not activate the Adobe Font version in InDesign). I also tried with the OTF version from Font Squirrel, with the same results. The file encryption.xml is kept in the META-INF folder. Is there a way to make this work as intended without breaking any license agreement? I read the thread about embedding Adobe Fonts in Kindle: https://www.mobileread.com/forums/sh...d.php?t=342147. I do not want to de-obfuscate the Adobe font, but to use the encrypted and non-encrypted fonts together in an EPUB. |
01-24-2022, 11:09 AM | #2 | |
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:
One note--the encrypted fonts will NOT pass ePUBcheck, IME. Adobe claims that "of course you can use them for your eBook," but what they mean is, on your computer, or any local computer--not in a retail situation. So...we remove everything, re-embed fonts, and change the CSS. Having two of the same font seems as though it's asking for trouble. What's the HTML and CSS around that text, the text in the image? Hitch |
|
Advert | |
|
01-25-2022, 12:04 PM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Hi Hitch,
Thanks for your answer. I chose Quicksand because it is the closest free alternative I found to VAG Rundschrift. If you know another one, please tell me. The file with encrypted fonts do pass EPUB check. I use the pagina EPUB-Checker. It has no errors or warnings, but there is a message stating that the fonts cannot be decrypted. The HTML for the title is just this: Code:
<p class="Numero-capitulo2">Capítulo dos</p> Code:
body, div, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, pre, code, blockquote { margin:0; padding:0; border-width:0; } body { -epub-hyphens:auto; } |
01-25-2022, 02:18 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:
Which version of Pagina are you using? When I run ePUBcheck (pagina, 2.04) against an encrypted ePUB, it gives me a ton of error messages. Are you assuming that "passing" is the same as "usable"? It'll validate, but you'll get a ton of INFORMATION notes. You don't see those? (n.b.: that used to cause it to fail; now it's information. I don't know when/how that changed--one of the Nerd Birds here will know.) Quote:
Hitch |
|||
01-25-2022, 06:33 PM | #5 |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Seriously, please change font-family:Quicksand; to font-family: sans-serif;. I've had enough removing Quicksand from eBooks. Why do you actually need VAG whatever it is when sans-serif would do just fine?
|
Advert | |
|
01-26-2022, 11:02 AM | #6 | ||
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Quote:
Quote:
Code:
@font-face { font-family:Quicksand; font-style:normal; font-weight:normal; src : url("../font/Quicksand-Regular.ttf"); } @font-face { font-family:VAGRundschriftD; font-style:normal; font-weight:normal; src : url("../font/VAGRundschriftD.otf"); } p.Numero-capitulo2 { color:#39a2c4; font-family:VAGRundschriftD, Quicksand, sans-serif; font-size:3em; font-style:normal; font-variant:normal; font-weight:normal; line-height:1.2; margin-bottom:45px; margin-left:0; margin-right:0; margin-top:0; orphans:1; page-break-after:auto; page-break-before:always; text-align:right; text-decoration:none; text-indent:0; text-transform:none; widows:1; } Code:
font-family:VAGRundschriftD, Quicksand, sans-serif; Code:
font-family:VAGRundschriftD, Futura, sans-serif; |
||
01-26-2022, 11:06 AM | #7 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Quote:
I need VAG because the client is using this font in the print version, and requires it to be in the eBook as well. Apple is going to be the major vendor, and it should work there. The free alternatives to the font (Fredoka One, Quicksand) are not so similar. |
|
01-26-2022, 03:18 PM | #8 | |
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:
(I did have bona fide issues with Quicksand in a print book. That's an entirely different discussion, unrelated to my opinion about the font.) Hitch |
|
01-26-2022, 03:26 PM | #9 | |
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:
In the second version of the EPUB, the main font works for all the characters of the word? It is only when you use the Quicksand font that letters are replaced? Is that the bottom line? And it happens in no other location? Just this one sentence/line? The Futura does not show up, right? I agree. That's damned weird. And only the reading apps like "IBooks" (or whatever they're calling it now) are displaying this mixed-font approach? Those that don't, like KP3, the original font alone displays? Hitch |
|
01-26-2022, 04:38 PM | #10 | |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Then you have ePub where you do see the embedded fonts, but if the person doesn't like the font, s/he won't be happy. |
|
01-27-2022, 09:43 AM | #11 | ||
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Quote:
Quote:
The second version of the EPUB, just with Futura and the Adobe fonts, has no problem at all. Trouble begins when encrypted and non-encrypted fonts are together. In the attachment, you can see the mixed characters in the next paragraph as well, which has font-family:"Expressway Xb", sans-serif; |
||
01-27-2022, 09:56 AM | #12 | |
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:
I have to wonder if this would persist, even after the ePUB underwent intake and pre-publishing processing, at Apple, et al. I do think, though, that it makes the concept of "encrypted fonts supported" sort of...misleading. :-) You seem to be stuck with either ALL encrypteds, or none. BTW--here's another question--if you mix fonts in the fallback and BOTH are encrypted, does it still happen? Hitch |
|
01-27-2022, 10:25 AM | #13 |
Grand Sorcerer
Posts: 6,702
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Is it possible that the encrypted font is also being subsetted?
If text was added or changed after font subsetting then there may be characters used in the book that are missing from the subsetted font. That could result in the missing glyphs being rendered using the fallback font on some platforms. |
01-27-2022, 11:00 AM | #14 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
|
Quote:
I changed and added text after encryption and subsetting. Now I can use the Adobe font with the Google font as fallback. Before reading your answer, I was trying another encrypted font as fallback (as suggested by Hitch), but the mixed-character problem persisted. The explanation was the same. Let's see if everything work as intended after publication in Apple and in Amazon. |
|
01-27-2022, 02:59 PM | #15 | |
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:
Also, n.b.: be very very very careful on Amazon with subsetting, particularly around subsetting ligatures that YOU did not use in the ebooks--but that Amazon will use in the LookInside!!! Hitch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding Adobe Fonts | pickil11 | Editor | 2 | 12-12-2021 04:18 PM |
How do I manually specify the fallback fonts for sans-serif, serif, monospace, etc.? | rtiangha | KOReader | 4 | 12-19-2019 05:54 AM |
Embedded custom fonts and fallback styling | santosha | Kindle Formats | 10 | 08-14-2013 05:17 PM |
Change fonts for Adobe Digital Edition? | rock | Astak EZReader | 10 | 02-16-2011 03:33 PM |
Fonts in Adobe Digital Editions | odt2epub | ePub | 4 | 03-24-2010 01:54 AM |