![]() |
#1 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
|
http://www.keystonelaw.co.uk/other/k...ont-licensing/
Quote:
-drj |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
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.
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,567
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
|
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?
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2014
Device: none
|
Thank you for that information drjenkins: it is very helpful
![]() |
![]() |
![]() |
![]() |
#10 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
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> |
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.) |
![]() |
![]() |
![]() |
#13 | |
Interested in the matter
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,567
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |