06-28-2020, 12:36 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: android tablet
|
Font embedding and app-reader compatibility
Hello,
I've been trying to read an epub I created w/ Calibre that has an embedded font (Noto mono - an open monospaced font from Google) in an iPad device but it won't see the embedded font. It only displays fonts installed originally in the device, e.g. Athelas, Charter, Georgia, Iowan, Palatino, San Francisco, New York, Seravek, Times New Roman Is there sth else I can do with the epub while I create it w/ Calibre so that iBooks (or/and possibly other devices) can read the embedded font? ((( This is the procedure I follow so far. It seems to work w/ various reader apps for android like kobo, pocketbook or pc readers like Adobe Digital Editions. I drag the Word docx file (the book) inside Calibre I press Convert Books In the Look & Feel tab -> Embed Font Family -> I choose the font I want to embed then press ok then save the book then load the epub in iPad through mail ))) I've been told that using embedded fonts in epub is a hassle and that it may result in some distributors stripping the embedded font from the epub completely. I can't imagine what will happen then. Will some other monospace font be loaded into place? Or just some other random font that'll mess up the book form completely? It's very important for me to have the book displayed in a monospaced font (any monospaced really) as it has a specific form that must be kept (like code but not exactly). The only reason I decided to use the embedded method is to have the epub presented in the way that I want w/ some major distributors like kindle, kobo, iBooks, Barnes & Noble. So far only the kobo app works ok (with or w/out embedded), the kindle app works only if I embed, Barnes and Noble is a mystery (not available in my country), and iBooks just doesn't see the embedded font. I'm not a professional programmer, so all this seems confusing to say the least. Any ideas on how to get the epub to display properly to most major distributors? In your professional opinion is it better to embed or not? (so as to get any device to display it in a monospaced font) So sorry for the long post p.s. this is part of the code in the stylesheet file that calibre creates: .block_25 { color: black; display: block; font-family: serif; font-size: 1em; line-height: 1.15; text-align: justify; padding: 0; margin: 0 } .calibre { color: #365F91; display: block; font-family: "Noto Mono", monospace; font-size: 0.625em; padding-left: 0; padding-right: 0; margin: 0 5pt } and this is what the page_styles file looks like: @page { margin-bottom: 5pt; margin-top: 5pt } @font-face { font-family: "Noto Mono"; panose-1: 2 11 6 9 3 8 4 2 2 4; src: url(fonts/Noto-Mono.ttf) } |
06-28-2020, 03:56 PM | #2 | |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
This extra step is needed for iBooks, but not for any other Reader that I know of. Last edited by thiago.eec; 06-28-2020 at 03:59 PM. |
|
Advert | |
|
06-29-2020, 05:09 AM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: android tablet
|
Thanks for the reply. I've got a few more questions
"I suppose you are creating an EPUB2." Is the epub3 a better solution for embedded fonts? "...just add the attached file to the META-INF folder of your EPUB file." This folder only contains a single file: container.xml "This folder is the same where your OPF file is located." the only opf file I could locate is in the main folder, not in the meta-inf one: content.opf Would I have to unzip the epub file, then add the file you're suggesting and then rezip the files in epub form? or just insert the attached file in calibre? Thank you very much in advance |
06-29-2020, 08:17 AM | #4 | ||
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
But, if you use EPUB3, you don't need this XML file. You just have to edit the OPF file, like this: Code:
<?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="isbn-id" prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/ a11y: http://www.idpf.org/epub/vocab/package/a11y/#" xml:lang="pt-BR"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <meta property="ibooks:specified-fonts">true</meta> ... Quote:
No need to unzip. Just add it via calibre. |
||
06-29-2020, 08:24 AM | #5 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
06-29-2020, 09:24 AM | #6 |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
To be honest, I don't know for sure. I think it might.
But, since the iBooks is EPUB3 aware, using the OPF meta property seems more reasonable. No need for an extra file. And this does not break backwards compatibility, since it is an iBooks specific property. |
07-04-2020, 05:57 AM | #7 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: android tablet
|
Thanks a bunch!
The xml file worked in iPad |
07-04-2020, 06:35 AM | #8 |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
IMHO, I find the OPF solution to be messy. I prefer the XML file solution as i doesn't make a mess.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Embedding font breaks font-family? | Calan | Amazon Kindle | 1 | 06-13-2020 11:48 AM |
Embedding font in books that already have embedded font | Barty | Calibre | 2 | 10-16-2013 11:38 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 |