Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2009, 08:58 PM   #1
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,412
Karma: 3261181
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Epub & fonts

My current ebook project has a couple of fonts specified. I'd like to make sure they're included in the Epub version.

I have fonts and the html source properly names them. Do I just copy the fonts into the epub or is there a more complicated process involved?

Thanks.
Nate the great is offline   Reply With Quote
Old 07-26-2009, 09:01 PM   #2
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
you have to make sure the fonts are listed in the manifest as well of course, and it's probably best to keep them in a specific fonts folder, but after that, yes, you just copy them in. make sure all your references (html / css, and manifest) give the precise location (including name of subdirectory : case matters). you can take a look at how they're referenced in one of jellby's epubs (i believe the prince and the pauper has embedded fonts) or my epub of three men and a boat.
zelda_pinwheel is offline   Reply With Quote
Old 07-26-2009, 09:19 PM   #3
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,412
Karma: 3261181
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Would this be correct? I'm not quite certain what the id is for.

<item id="Tahoma" href="Tahoma_KOI8.ttf" media-type="application/x-truetype-font" />
Nate the great is offline   Reply With Quote
Old 07-26-2009, 09:23 PM   #4
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
i used this :

<item id="fontinbold_font" href="fonts/Fontin-Bold.ttf" media-type="application/x-truetype-font" />
<item id="fontinitalic_font" href="fonts/Fontin-Italic.ttf" media-type="application/x-truetype-font" />
<item id="fontinregular_font" href="fonts/Fontin-Regular.ttf" media-type="application/x-truetype-font" />

with more descriptive ids, so i could differentiate between the various fonts (since i have 3 from the same family).

other than that, i don't see a font folder, are your fonts at the root of the epub file ? if not, don't forget the path.
zelda_pinwheel is offline   Reply With Quote
Old 07-27-2009, 06:34 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,105
Karma: 4791309
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Nate the great View Post
Would this be correct? I'm not quite certain what the id is for.

<item id="Tahoma" href="Tahoma_KOI8.ttf" media-type="application/x-truetype-font" />
That would be fine if Tahoma_KOI8.ttf sits at the same directory as the .opf file. The "id" is only a label you have to give to the file, as you have to do with every other file you include in the ePUB, images included. As far as I know the "id" is only really used in the <spine>, though.

In the .css files, you need the @font-face statement, and in the src property the url must be relative to where the .css sits. Like this:

Code:
@font-face {
  font-family: "Dearest";
  src: url("../fonts/Dearest.ttf") format("truetype");
}
The .css is in OEBPS/css, and the .ttf in OEBPS/fonts.

As examples, of my ePUBs, "The Prince and the Pauper", "Savage Stories of Conan", "Don Quijote" and "Novelas Ejemplares" use embedded fonts.
Jellby is online now   Reply With Quote
Old 07-27-2009, 08:30 AM   #6
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,412
Karma: 3261181
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by Jellby View Post
That would be fine if Tahoma_KOI8.ttf sits at the same directory as the .opf file. The "id" is only a label you have to give to the file, as you have to do with every other file you include in the ePUB, images included. As far as I know the "id" is only really used in the <spine>, though.

In the .css files, you need the @font-face statement, and in the src property the url must be relative to where the .css sits. Like this:

Code:
@font-face {
  font-family: "Dearest";
  src: url("../fonts/Dearest.ttf") format("truetype");
}
The .css is in OEBPS/css, and the .ttf in OEBPS/fonts.

As examples, of my ePUBs, "The Prince and the Pauper", "Savage Stories of Conan", "Don Quijote" and "Novelas Ejemplares" use embedded fonts.
Hmm. I think is going to finally push me into using a separate css file.

Will that @font-face declaration work if it's between the style tags in the header of an html file? If so, then becuase calibre will extract the data this means I can continue to use MobiCreator.
Nate the great is offline   Reply With Quote
Old 07-27-2009, 08:43 AM   #7
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Zelda and Jellby seem to have you squared away on the technical aspects, but I wanted to mention that Tahoma can't legally be included in an epub for redistribution. To the best of my knowledge, only Microsoft can distribute that typeface.
Abecedary is offline   Reply With Quote
Old 07-27-2009, 10:37 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,105
Karma: 4791309
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Nate the great View Post
Will that @font-face declaration work if it's between the style tags in the header of an html file? If so, then becuase calibre will extract the data this means I can continue to use MobiCreator.
I don't see why it shouldn't... you could always wrap all the style between <![CDATA[ and ]]> if it gives problems with XHTML (see "Dealing with XHTML" here).
Jellby is online now   Reply With Quote
Old 07-28-2009, 06:13 AM   #9
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by Abecedary View Post
I wanted to mention that Tahoma can't legally be included in an epub for redistribution.
Many font foundaries haven't really come to terms with ebooks yet. I just asked Monotype how much a licence for including a roman and italic of one of their fonts in an ebook would be.

£1500. For a five year licence.

To be fair, this fee covers up to five fonts, and in up to five different ebooks. I suppose if you were publishing lots of popular ebooks, £60/book/year wouldn't be completely out of the question. But it still seems very high to me.

And they did also say they're "in the process of reviewing" their ebook strategy.
pdurrant is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding fonts in EPUB? Acey Calibre 19 11-06-2011 10:01 AM
iPad iBooks, ePub, embedded fonts & encryption pdurrant Apple Devices 37 06-08-2010 01:24 PM
Other epub fonts Opus talaivan Bookeen 4 03-03-2010 02:40 PM
PRS Fonts, PDF gray && Calibre Hranostak Sony Reader 5 11-24-2008 11:50 AM
PRS Fonts, PDF gray && Calibre Hranostak Sony Reader 1 11-22-2008 02:50 PM


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


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