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 02-17-2015, 07:08 AM   #1
Wilfred9667
Junior Member
Wilfred9667 began at the beginning.
 
Wilfred9667's Avatar
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
Font file reference error

I've had a look at a recent 'Embedding Fonts' thread, but it did not answer my question.

I am using calibre v. 1.48, on a Mac OS X 10.5.8 system [I am upgrading soon, but all in good time!]. I have converted a book I wrote from html/css to ePub, and have eliminated most of the problems, but I have a persistent font recognition problem.

A css class using the Arial Narrow font is referenced, as below, in stylesheet.css:

.chfrtnbktop {
display: block;
font-family: "Arial Narrow";
font-size: 1.571em;
line-height: 1.2;
text-align: justify;
width: 100%;
word-spacing: 0.25em;
margin: 0 0 0.409em 2.775em
}

I had previously had a problem after running a 'check book' routine, that the font was not found, despite opting to embed all referenced fonts, and it was not present in page_styles.css, so I imported the font file using the 'import resource file' option from File->New file, as recommended. A further 'check book' run produced the following error:

"fonts/Arial_Narrow.ttf

This file is included in the book but not referred to by any document in the spine. This means that the file will not be viewable on most ebook readers. You should probably remove this file from the book or add a link to it somewhere."

This error could not be corrected as a fixable error. The file is referred to by a document in the spine, using the html:

<p class="chfrtnbktop">TEXT</p>

This text forms part of [the top line, to be exact] a separate section that is the representation of a printed label on a book referred to in the text, and there are 2 horizontal lines in the section that are imported & displayed as image files, as well as other text that is displayed correctly when viewed in iBooks on an iPad [although the conversion was done for the Sony PRS reader, again as recommended to be generic, with a 590x775 screen size], so I don't think that is an explanation for the Arial Narrow font not being displayed on the iPad, even though it is clearly referenced.

Can you help please? I suppose I could export the complete section from the original document as an image, and import this image in the html, but I would like to know why this problem is occurring, to prevent it occurring in future, in my next book. Thank you.
Wilfred9667 is offline   Reply With Quote
Old 02-17-2015, 07:30 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Have you defined the font as @font-face in the stylesheet? Besides that, keep in mind that if you distribute your resulting ePUB, you need to check if you are licensed to do so with the font. AFAK Arial is not allowed to be distributed in an ePUB.
Toxaris is offline   Reply With Quote
Advert
Old 02-18-2015, 05:31 AM   #3
Wilfred9667
Junior Member
Wilfred9667 began at the beginning.
 
Wilfred9667's Avatar
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
Thank you for your reply Toxaris. Yes, I did define the font as @font-face in the stylesheet. It should have been recognised, hence my question.

The font was in my library fonts folder, as part of the system on my MacBook, so I have it quite legitimately.
Wilfred9667 is offline   Reply With Quote
Old 02-18-2015, 05:37 AM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,502
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Umm.. Just because you have it on your computer ad part of its installation does not mean you can embed it within an ePub.
PeterT is offline   Reply With Quote
Old 02-18-2015, 07:56 AM   #5
drjenkins
Addict
drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.
 
Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
http://www.keystonelaw.co.uk/other/k...ont-licensing/

Quote:
Apple: It is also interesting to examine the font licensing information given in the licence for Apple’s OS X “Mountain Lion” operating system. (This can be found at http://images.apple.com/legal/sla/docs/OSX108.pdf.)

Clause 1A (“General”) says:

“The Apple software … documentation, interfaces, content, fonts and any data accompanying this License … (collectively the “Apple Software”) are licensed, not sold, to you by Apple Inc. … for use only under the terms of this License.”

Clause 2E (“Fonts”) says:

“Subject to the terms and conditions of this License, you may use the fonts included with the Apple Software to display and print content while running the Apple Software; however, you may only embed fonts in content if that is permitted by the embedding restrictions accompanying the font in question. These embedding restrictions can be found in the Font Book/Preview/Show Font Info panel.”

(Apple’s Font Book application lets you manage the fonts on your computer. If you have a Mac, look in your “Applications” folder.)
The site contains information concerning fonts included with Microsoft operating systems and programs as well as Apple. They also go into more information as to what "embedding" means in the context of font licensing.

-drj
drjenkins is offline   Reply With Quote
Advert
Old 02-18-2015, 09:10 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Wilfred9667 View Post
The font was in my library fonts folder, as part of the system on my MacBook, so I have it quite legitimately.
Having it on your computer doesn't automatically mean that you're allowed to embed it in an ePub book, I'm afraid. You need to check the licence for that specific font.
HarryT is offline   Reply With Quote
Old 02-19-2015, 03:03 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,567
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Wilfred9667 View Post
so I don't think that is an explanation for the Arial Narrow font not being displayed on the iPad
I've not seen any mention of the xml.apple.something.hoobi-whatie.something-something file that goes in the MISC directory in order to make the rendering of embedded fonts work in iBooks.
DiapDealer is online now   Reply With Quote
Old 02-22-2015, 06:58 AM   #8
Wilfred9667
Junior Member
Wilfred9667 began at the beginning.
 
Wilfred9667's Avatar
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
Quote:
Originally Posted by DiapDealer View Post
I've not seen any mention of the xml.apple.something.hoobi-whatie.something-something file that goes in the MISC directory in order to make the rendering of embedded fonts work in iBooks.
Thank you for your reply DiapDealer. I wonder if you could tell me what you mean by the "xml.apple.something.hoobi-whatie.something-something file"? There isn't a MISC folder [directory?] in my book, but there is a Miscellaneous folder, and the only xml file in there is container.xml, so I presume you don't mean this one?
Wilfred9667 is offline   Reply With Quote
Old 02-22-2015, 07:01 AM   #9
Wilfred9667
Junior Member
Wilfred9667 began at the beginning.
 
Wilfred9667's Avatar
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
Thank you for that information drjenkins: it is very helpful
Wilfred9667 is offline   Reply With Quote
Old 02-22-2015, 07:28 AM   #10
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Wilfred9667 View Post
Thank you for your reply DiapDealer. I wonder if you could tell me what you mean by the "xml.apple.something.hoobi-whatie.something-something file"? There isn't a MISC folder [directory?] in my book, but there is a Miscellaneous folder, and the only xml file in there is container.xml, so I presume you don't mean this one?
He means the com.apple.ibooks.display-options.xml file. It must be in the META-INF folder. For iBooks (could be only for older versions, I am not sure) it must be present to display embedded fonts.
It should at least contain:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
<platform name="*">
<option name="specified-fonts">true</option>
</platform>
</display_options>
Toxaris is offline   Reply With Quote
Old 02-22-2015, 05:43 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,567
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Oops... sorry. It IS the META-INF and not the MISC folder.
Thanks for the correction, Toxaris!
DiapDealer is online now   Reply With Quote
Old 02-22-2015, 07:22 PM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@Wilfred9667, Misc will be the way it is sorted in the editor's File Browser. It is important to realize that those are grouped by type, not directory structure.

(Sigil for example gets around this by automatically sorting files into a specific directory structure. calibre does not do this.)
eschwartz is offline   Reply With Quote
Old 02-23-2015, 01:44 AM   #13
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Quote:
Originally Posted by eschwartz View Post
(Sigil for example gets around this by automatically sorting files into a specific directory structure. calibre does not do this.)
Open an epub with Calibre editor.
File->Import files into book.
You import: com.apple.ibooks.display-options.xml
This file is automatically imported into the folder META-INF.

It is also interesting:
Arrange files into folders by type in http://manual.calibre-ebook.com/edit.html

Last edited by jbacelar; 02-23-2015 at 01:54 AM.
jbacelar is offline   Reply With Quote
Old 02-23-2015, 09:25 AM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,567
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by jbacelar View Post
Open an epub with Calibre editor.
File->Import files into book.
You import: com.apple.ibooks.display-options.xml
This file is automatically imported into the folder META-INF.

It is also interesting:
Arrange files into folders by type in http://manual.calibre-ebook.com/edit.html
I think eschwartz just meant that Sigil enforces a particular directory structure on all epubs (which it does), whereas calibre's editor will happily work with an epub's original directory structure without changing it. "Arrange into folders by type" is something a user may choose to do with calibre's editor; and the directory structure can be customized. Sigil's directory restructuring is mandatory, uncustomizable, automatic, and silent.
DiapDealer is online now   Reply With Quote
Old 02-23-2015, 10:30 AM   #15
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Somethin like that -- I just meant to say that the "structure" shown in the UI is in no way indicative of the internal structure, and calibre particularly can have the actual files anywhere.

Aside -- you're darn right I know about Arrange into Folders, that was my feature request.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
this file converts with no error but the resulting file is "invalid" mlevin77 Conversion 3 01-11-2014 08:34 AM
ttc font file can't be put into font folder droople Sigil 2 08-21-2010 10:05 AM
Adding a <reference> item to <guide> in OPF file GRiker Sigil 2 04-12-2010 01:06 PM
Font embedding error Peto Calibre 2 08-05-2008 10:40 AM


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


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