Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2022, 11:11 PM   #1
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Error after embedding fonts

I'm not sure when this error started happening, because generally, I run Check Book before I embed fonts.

I first noticed in mid-June that after embedding fonts, if I run Check Book, I get this error message. It has happened consistently since I noticed. As the embedding and generation of the content.opf is performed by Calibre (to my knowledge) I'm not sure where, or if, I can fix this. It also happens for ALL fonts I try to embed (I have about 4 that I have used for years)

Quote:
The file fonts/Dion.otf has its MIME type specified as font/otf in the OPF file. The recommended MIME type for files with the extension "otf" is application/vnd.ms-opentype. You should change either the file extension or the MIME type in the OPF.
It’s a quick fix, I just hit the "Try to correct all...” link and it's fine, but I'd like to know if there's something I need to do to not have this step.

I'm running Calibre 5.44 on Windows 11 and all my plugins are up to date.
MerlinMama is offline   Reply With Quote
Old 07-09-2022, 11:23 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
The file fonts/Dion.otf has its MIME type specified as font/otf in the OPF file. The recommended MIME type for files with the extension "otf" is application/vnd.ms-opentype. You should change either the file extension or the MIME type in the OPF.
Both of those formats are correct for epub3 though the font/xxxxx form is the preferred form. If you are using epub2, the vendor specific form application/vnd.ms-opentype is the correct choice. However most renderers don't seem to care.
DNSB is offline   Reply With Quote
Advert
Old 07-09-2022, 11:40 PM   #3
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
OK...So there's no way to avoid that extra step when I get the message (I realize now it's a 'warning' and not an 'error')? It does seem to affect how the text with that font appears on my Kobo, as that is why I noticed it in the first place.
MerlinMama is offline   Reply With Quote
Old 07-10-2022, 12:19 AM   #4
Foozle
Connoisseur
Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.
 
Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
Normally if you import a font, it automatically adds the mimetype for you. Not sure why you would get that message if it's properly imported. Without knowing your process, it's hard to say why it happens. However, to answer the question, there's no way to avoid it if it finds that it should be changed to the proper mimetype.
Foozle is offline   Reply With Quote
Old 07-10-2022, 12:29 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,344
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@MerlinMama: What version of EPUB is this? I tried the following steps with an EPUB 3.0 file:

1) Click File->New file
2) Click import resource
3) Choose an OTF font file
4) Click OK
5) Open content.opf and find the newly created entry for the font
6) The media-type is application/vnd.ms-opentype as expected
kovidgoyal is offline   Reply With Quote
Advert
Old 07-10-2022, 04:53 AM   #6
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
I'm not sure about ePub2 or ePub3, probably both?

I've had these fonts installed since at least 2017 -- just as I was about to hit send I realized that while I've been using them for years I had to reinstall them when I got my new computer in February. I think I only started having trouble in early to mid-June, but could be wrong.

I don't import them each time, should I be? I usually just embed and then subset the fonts once I'm ready to sent to my Kobo. I also tried without subsetting them and it doesn't change anything.

I'll have to get an older book that already has them embedded from before February and see if I get that message
MerlinMama is offline   Reply With Quote
Old 07-10-2022, 06:59 AM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by MerlinMama View Post
I'm not sure about ePub2 or ePub3, probably both?

I've had these fonts installed since at least 2017 -- just as I was about to hit send I realized that while I've been using them for years I had to reinstall them when I got my new computer in February. I think I only started having trouble in early to mid-June, but could be wrong.

I don't import them each time, should I be? I usually just embed and then subset the fonts once I'm ready to sent to my Kobo. I also tried without subsetting them and it doesn't change anything.

I'll have to get an older book that already has them embedded from before February and see if I get that message
Is there a reason to embed when you can just side load the fonts to your Kobo and not have to embed to use the font?
JSWolf is offline   Reply With Quote
Old 07-10-2022, 07:29 AM   #8
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Because these are not the overall font. I use one for letters, one for transitions (eg. Later that Day), and one for Newspaper articles. If I don't embed, even if they are on my Kobo, they do not show. If I don't have any of these instances, I don't embed.

So if the book is in, for example, New Times Roman, and that's all there is, I don't embed. If there's a letter, I have just that show as Segoe Print. A newspaper article, Kirsty. Even if I have all the Fonts on my Kobo, everything shows up only in Times New Roman.

I've never been able to get it to work without embedding, on any of my Kobo devices.
MerlinMama is offline   Reply With Quote
Old 07-10-2022, 07:40 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by MerlinMama View Post
Because these are not the overall font. I use one for letters, one for transitions (eg. Later that Day), and one for Newspaper articles. If I don't embed, even if they are on my Kobo, they do not show. If I don't have any of these instances, I don't embed.

So if the book is in, for example, New Times Roman, and that's all there is, I don't embed. If there's a letter, I have just that show as Segoe Print. A newspaper article, Kirsty. Even if I have all the Fonts on my Kobo, everything shows up only in Times New Roman.

I've never been able to get it to work without embedding, on any of my Kobo devices.
There used to be a way to access side loaded fonts in CSS as though they were embedded without actually having to embed.

I'm not 100% sure if this will work on the 4.33 firmware.

Code:
@font-face {
font-family: monospace;
font-style: normal;
font-weight: normal;
src: url("res:///fonts/normal/Dark Courier");
}
@font-face {
font-family: monospace;
font-style: normal;
font-weight: bold;
src: url("res:///fonts/bold/Dark Courier");
}
@font-face {
font-family: monospace;
font-style: italic;
font-weight: normal;
src: url("res:///fonts/italic/Dark Courier");
}
@font-face {
font-family: monospace;
font-style: italic;
font-weight: bold;
src: url("res:///fonts/bolditalic/Dark Courier");
}

Last edited by JSWolf; 07-10-2022 at 07:43 AM.
JSWolf is offline   Reply With Quote
Old 07-10-2022, 10:44 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,344
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah you use embed, this should take care of it: https://github.com/kovidgoyal/calibr...ba5532f364a086
kovidgoyal is offline   Reply With Quote
Old 07-10-2022, 12:17 PM   #11
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 817
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Thank you for this, Kovid. I have the same issue and this will make things easier.
icallaci is offline   Reply With Quote
Old 07-10-2022, 12:27 PM   #12
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Thank you
MerlinMama is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error unhandled exception embedding fonts rjwse@aol.com Editor 2 11-06-2018 09:21 AM
Embedding fonts DrChiper Editor 11 02-24-2014 11:13 AM
Fonts embedding 1drey Writer2ePub 3 06-17-2011 11:15 PM
Embedding fonts JaneFancher Calibre 14 04-10-2010 09:28 PM
Embedding fonts AprilHare ePub 6 01-02-2010 11:42 AM


All times are GMT -4. The time now is 03:11 AM.


MobileRead.com is a privately owned, operated and funded community.