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 11-11-2016, 04:20 PM   #1
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Calibre will only embed certain fonts and not others. Why?

Often I get this error message:

Failed to find font matching: ...

See attached image.

How come?

How do I know which font it will embed, and which it wont?
Attached Thumbnails
Click image for larger version

Name:	calfont.png
Views:	517
Size:	13.7 KB
ID:	152933  
hidden.platypus is offline   Reply With Quote
Old 11-11-2016, 06:38 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
are those variations installed on your system?

Do they allow embedding (in the fonts properties)?
theducks is offline   Reply With Quote
Advert
Old 11-11-2016, 08:52 PM   #3
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are many possible problems in font files that can prevent them from being matched. Impossible to say what the problem is with your particular fonts without access to the font files.
kovidgoyal is offline   Reply With Quote
Old 11-12-2016, 06:34 AM   #4
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Maybe he is looking for the wrong weight 400 and 700? Bookman old is part of MS Office, but weight there is 300 and 600
Attached Thumbnails
Click image for larger version

Name:	calEmbFonts.JPG
Views:	411
Size:	217.8 KB
ID:	152939  
Divingduck is offline   Reply With Quote
Old 11-12-2016, 11:24 AM   #5
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
@theducks

These fonts are installed on a Win10 machine. I'm converting from Word, so not specifying the variations.

Even though Calibre gives me that error, when I view the epub in the Calibre viewer it displays with those fonts. When I view elsewhere, of course it doesn't display them.

@divingduck

What program is that you're using? I'd be happy to post a screenshot using that same app if it will help.
hidden.platypus is offline   Reply With Quote
Advert
Old 11-12-2016, 11:41 AM   #6
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
It's a nice tool called Inside Fonts (http://www.insidefont.de/en/index.html).
Divingduck is offline   Reply With Quote
Old 11-12-2016, 12:40 PM   #7
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
I only included one font.

One thing I will also bring up, is whenever I embed fonts during a conversion, whenever I open the file in the editor, and click the check for bugs button, it gives me this error for every font that's successfully embedded:

Code:
CSS: Property: Not valid for profile "['CSS Fonts Module Level 3 @font-face properties']" but valid "CSS Fonts Module Level 3" value: normal [9:5: font-stretch] [page_styles.css]
If I upload to the IDPF validator, the epub validates whether I remove that from the CSS or not. But Calibre throws up that error every time a font is embedded.
Attached Thumbnails
Click image for larger version

Name:	cochin.png
Views:	323
Size:	79.8 KB
ID:	152957  
hidden.platypus is offline   Reply With Quote
Old 11-12-2016, 12:42 PM   #8
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Thank you @divingduck for this program.
hidden.platypus is offline   Reply With Quote
Old 11-12-2016, 12:58 PM   #9
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Since this program told me that the Cochin font I like is on my system in 500 weight, I edited the code in stylesheet.css.

I changed

font-weight: normal

to

font-weight: 500

Looking towards a solution to this, please forgive me for reiterating: I did not initially specify a font weight. All I did was convert a Word docx file to epub. The only check boxes of consequence that I have checked in the conversion process are Embed all fonts in document and Subset all fonts in document.

Based on the error messages I've gotten, I am guessing most programs understand font-weight: normal to = 400.

Is that the spec?

Yes it is:

Per: https://www.w3.org/wiki/CSS/Properties/font-weight

The keyword 'normal' is synonymous with '400', and 'bold' is synonymous with '700'.

Last edited by hidden.platypus; 11-12-2016 at 01:08 PM. Reason: Answered own question
hidden.platypus is offline   Reply With Quote
Old 11-12-2016, 08:39 PM   #10
nabsltd
Evangelist
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 417
Karma: 6913952
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
Quote:
Originally Posted by kovidgoyal View Post
There are many possible problems in font files that can prevent them from being matched. Impossible to say what the problem is with your particular fonts without access to the font files.
I just ran into the same thing, and it would really help if Calibre gave us more information about the font from within the book editor. You can double click on a font in the "Manage Fonts" dialog and get some info, but not all. The "Choose Font Family" from the Conversion->Common Options gives you more info (width, at least).

Also, Calibre needs to map the CSS font-weight names into numbers. I had the following fail to find a matching font:
Code:
.text-western {
	font-family: "Playbill", "Wanted", serif;
	font-size: 2em;
	font-stretch: extra-condensed;
	font-weight: medium;
}
When looking at the "Choose Font Family" dialog, I see the attached. This is a perfect match, and yet until I do the following, Calibre won't find the font:
Code:
.text-western {
	font-family: "Playbill", "Wanted", serif;
	font-size: 2em;
	font-stretch: extra-condensed;
	font-weight: 500;
}
Perhaps a feature to embed a font regardless of whether there is a "match" would be good. Calibre could just insert the font into the book and add a perfectly matching @font-face definition, and then just let us create CSS selectors that match that definition.
Attached Thumbnails
Click image for larger version

Name:	ChooseFontFamily.jpg
Views:	238
Size:	10.2 KB
ID:	152960  
nabsltd is offline   Reply With Quote
Old 11-12-2016, 08:46 PM   #11
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no such thing as font-weight: medium

The only keywords allowed for font-weight are: normal | bold | bolder | lighter and all of those calibre correctly handles.

https://developer.mozilla.org/en/doc...SS/font-weight
kovidgoyal is offline   Reply With Quote
Old 11-12-2016, 08:50 PM   #12
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And how is calibre supposed to give you more information about a font that has not been embedded, since the only information it has is the information already visible to you in the CSS rules? I suppose I could have the embed font button popup a report that shows why fonts with matching family names did not match fully.
kovidgoyal is offline   Reply With Quote
Old 11-12-2016, 08:53 PM   #13
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@hidden.platypus: There is no good solution to going from docx to epub and embedding fonts that have non-standard attributes, short of having the docx input plugin look for the font files and create complete CSS rules for them, which is not very robust, since the font files may or may not be present on the system when the docx file is being converted. You should embed the fonts in the docx file before conversion, then you are guaranteed that they wil be present in the epub after conversion.

Last edited by kovidgoyal; 11-12-2016 at 08:57 PM.
kovidgoyal is offline   Reply With Quote
Old 11-13-2016, 07:07 AM   #14
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Kovid,
I made a short experiment on an simple word document (version 2016). The document uses a standard setup with calibri font set including some lines of text and headlines. Used fonts are calibri for text and calibri light for headings (standard word setup too).

The first version was saved without fonts and then open directly with the calibre editor. Then I try to embed the fonts used. The editor was able to find the text font calibri but not the font calibri light used for headings.

So fare so good (or not).

For the next test I embed the fonts in the word document and open the file direct in the calibre editor. Everything goes well and all fonts are in the epub as expected. Then I delete manually the fonts files in the epub and try again to embed them within calibre editor. Same situation as in first test. calibre can't find the font calibri light.

After that I took a look inside the docx files specially for the fontTabel.xml. The information are more or less the same (excluding the references for embedded fonts)

So, the question for me is, why is calibre able to find font calibri regular and what is preventing calibre to find the font calibri light if both are standard fonts in the OS with no exotic setup? I can't remember when I did the last time this kind of evaluations but I can't remember that I had seen that for standard fonts in the past (I add fonts in my workflow most times manually if needed). Maybe I had forgot to test it or thought as Kovid this happen to me with some of my not standard fonts. Who knows.

Kovid, let me know if you like to see the samples.

Best regards,
DivingDuck
Divingduck is offline   Reply With Quote
Old 11-13-2016, 07:56 AM   #15
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibri light is probably not a regular font. If you want it to be detected you have to specify the correct font-weight, font-stretch etc. properties in the css rule referencing the font. If you find the editor is unable to embed the font after specifying the correct properties, then by all means send me a sample, witht he font files as well.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can it embed fonts? chalimac Kobo Reader 1 06-27-2017 05:46 PM
How to embed fonts in ePub after Calibre fiery ePub 79 12-05-2016 02:18 AM
Is it possible to really embed fonts yet? LaurelRusswurm ePub 25 11-17-2011 10:25 PM
Is it possible to UN embed fonts? lmronan Sigil 14 06-04-2010 09:26 AM


All times are GMT -4. The time now is 06:13 PM.


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