View Full Version : My EPUB Experiences


woeger
04-10-2010, 09:46 PM
I am new to EPUB, and based on recommendations have started converting all my Christian writings that I give away from my free Christian books (http://www.christly.com/christian_books.htm) ministry site.

I have discovered some things about EPUB (in general), the iPad and iBooks app, and also how to properly configure a webserver to host EPUB files (without them being seen as .ZIP files by Internet Explorer) that I wanted to share.

I was first drawn to EPUB by getting a new Apple iPad this week. I wanted to try to figure out how to create my existing Christian books that I already in HTML and PDF format to EPUB. This began an interesting journey of discovery.

I tried just about every EPUB creator and converter program I could find for either the Mac or PC. None did the job to my standards except for Atlantis Word Processor. I converted from my master .RTF files and had to do some page break issues as I originally used Apple's Pages word processor to make my word processor files. Once I created the EPUB's and checked them carefully (and of course validated them and preflighted them), I was ready to publish them on my webserver (or so I thought).

Internet Explorer 8 saw them as .ZIP files from my webserver (Linux running lighttpd light webserver). I found out the MIME types were not being set correctly, so I configured lighttpd.conf configuration file by adding:

".epub" => "application/epub+zip",

This fixed the problem and now Adobe Digital Editions opens the files right from Internet Explorer 8. I also tested this on my Mac Pro (using Apple Safari browser) and it downloads the EPUB file(s) correctly which can viewed with a program like Calibre.

Since I have written about 44 Christian books and writings, I plan to convert them one by one (due to word processor conversion page break issues with formatting in EPUB) to EPUB files to give away free from my web site.

Uploading through iTunes 9.1+ is so easy. You just drag the file to the "Books" tab in iTunes and drop it there, then force a Sync with the iPad. I understand that Apple just announced at the iPhone 4.0 software developer's meeting this week that all iPhones and iPod Touched will get a version of their iBooks app when the iPhone OS 4.0 is released this summer. That would add almost 85 million new EPUB capable reader devices worldwide (~50 million iPhones and 35 Million iPod ouched per Steve Jobs).

I am looking forward to see how EPUB grows and expands. I am glad making EPUB files is relatively easy (using Atlantis), ad hopefully my above MIME webserver config setting will help others to host their EPUB files on their web servers so users can download, save, and view their works.

Any hints or suggestions about making and distributing EPUB files would be greatly appreciated! I have not yet mastered table of contents creation, though I know Atlantis can do it somehow.

It was such a thrill to see books I had written appear in the iBooks app on my iPad. Now I can have the text flow and fonts changed at will. I also put the EPUB files on my Sony PRS-505 Reader and they work fine (except for no justification).

I chose not to embed fonts in the EPUB files to keep them smaller, and to avoid any copyright issues on including copyrighted fonts. I used Times New Roman as my default, so most devices will use that or another font that they have, such as the default Palatino font use on iBooks on the iPad.

charleski
04-10-2010, 11:54 PM
Any hints or suggestions about making and distributing EPUB files would be greatly appreciated! I have not yet mastered table of contents creation, though I know Atlantis can do it somehow.
It's simplicity itself. Select the text of your chapter title (eg. 'Chapter One'), go to the Format menu, select Style..., click one of the Heading styles and click apply. To get a nested ToC, use Heading one for the top level, Heading two for the second, etc. Every ePub should contain a useful table of contents to allow navigation.

I would highly recommend that you use styles for all parts of your book to ensure consistent presentation. Set a default style and apply it to all the body text. If you need to change something for a particular element, such as setting the first paragraph flush left or setting verse that's indented, create a new style with the right parameters and apply that rather than changing things in an ad hoc manner.

I chose not to embed fonts in the EPUB files to keep them smaller, and to avoid any copyright issues on including copyrighted fonts. I used Times New Roman as my default, so most devices will use that or another font that they have, such as the default Palatino font use on iBooks on the iPad.For anyone who enjoys books that look good, the iPad is a dirty word (http://fontfeed.com/archives/ipad-typography/) right now. Maybe Apple will get it right some time in the future.

There are plenty of fonts available that can be freely embedded without worrying about licensing. FontSquirrel (http://www.fontsquirrel.com/) is a good place to start, and there are many others mentioned in the threads in this forum.

Jellby
04-11-2010, 04:34 AM
There are plenty of fonts available that can be freely embedded without worrying about licensing. FontSquirrel (http://www.fontsquirrel.com/) is a good place to start, and there are many others mentioned in the threads in this forum.

But please refrain from using embedded fonts for the main text. Use them only for special purposes like headings, drop caps, decorative fragments, or text that must be displayed with particular glyph shapes.

paulpeer
04-11-2010, 06:19 AM
There are plenty of fonts available that can be freely embedded without worrying about licensing. FontSquirrel (http://www.fontsquirrel.com/) is a good place to start, and there are many others mentioned in the threads in this forum.

FontSquirrel indeed has a lot of nice fonts, but as far as I understand the licences, almost none of them can be used in ePubs. One of the licences states e.g.:
You may embed the licensed fonts into any document you send to third parties. Such documents may be viewed and printed (but not edited) by the recipients.
Every ePub can be edited and everyone can extract the fonts. Or is it enough that in the book is written that it may not be edited?

charleski
04-11-2010, 07:24 AM
FontSquirrel indeed has a lot of nice fonts, but as far as I understand the licences, almost none of them can be used in ePubs. One of the licences states e.g.:

Every ePub can be edited and everyone can extract the fonts. Or is it enough that in the book is written that it may not be edited?

You're referring to the Exljbris licence, which explicitly states:
You may use this font for Font-Face embedding, but only if you put a link to http://www.exljbris.nl on your page and/or put this notice /* A font by Jos Buivenga (exljbris) -> http://www.exljbris.nl */ in your CSS file as near as possible to the piece of code that declares the Font-Face embedding of this font.
This, of course, is exactly what is being done when embedding a font in an epub. All that's required is the addition of the required text to the css file.

Both epubs and web pages are intended as delivery formats. Both may be edited by an end-user if they have the correct tools and skills, but the same is true of PDFs. I see absolutely no reason for this licence to exclude use in epubs, in fact it explicitly allows the mechanism by which it would be used.

HarryT
04-11-2010, 07:28 AM
Both epubs and web pages are intended as delivery formats. Both may be edited by an end-user if they have the correct tools and skills, but the same is true of PDFs.

All you need to get the fonts out of an ePub file (unless it's encrypted) is a ZIP program. What tools are required to get embedded fonts out of a PDF file?

charleski
04-11-2010, 07:32 AM
But please refrain from using embedded fonts for the main text. Use them only for special purposes like headings, drop caps, decorative fragments, or text that must be displayed with particular glyph shapes.
Why? Obviously you shouldn't use an embedded display face for the body text, but I see no problem in overriding the slightly awkward version of Times used in Sony readers with a more appropriate body font.

paulpeer
04-11-2010, 07:46 AM
You're referring to the Exljbris licence, which explicitly states:

Hmm. I found a very similar licence:


If the font is a free font ($0.00 license fee), you may use this font for Font-Face embedding, but only if you put a link to www.exljbris.nl on your page and/or put this notice /* A font by Jos Buivenga (exljbris) -> www.exljbris.com */ in your CSS file as near as possible to the piece of code that declares the Font-Face embedding of this font.


If I look to the type Museo Sans, only the types Museo 500 Regular and Museo 500 Italic are free fonts. So you can use those two in an ePub, but you may not use the bold types nor the 10 other ones. That's why I wrote "almost none of them may be used ...".

Or I'm I misunderstanding something?

charleski
04-11-2010, 07:49 AM
All you need to get the fonts out of an ePub file (unless it's encrypted) is a ZIP program. What tools are required to get embedded fonts out of a PDF file?
It's perfectly possible to edit a PDF file, changing the words which are displayed.

charleski
04-11-2010, 07:57 AM
Or I'm I misunderstanding something?
FontSquirrel lists the three weights that are freely distributable and embeddable. I don't see what the problem is.

HarryT
04-11-2010, 09:22 AM
It's perfectly possible to edit a PDF file, changing the words which are displayed.

Sorry, I didn't make myself clear.

If you put a font in an ePub file, then unless the book is DRM protected I can just change the file extension to ".zip", open the file with any ZIP program, and copy the font to my PC, where I can then use it in any way that I wish.

With a PDF file, on the other hand, the font really is embedded there inside the file, and I don't know of any way to get it out again.

Will a licence that is adequate to cover embedding a font in a PDF therefore be sufficient to cover its use with an ePub, where it's more a case of packaging the font in the file rather than making it in any way inaccessible to the user?

charleski
04-11-2010, 09:57 AM
Will a licence that is adequate to cover embedding a font in a PDF therefore be sufficient to cover its use with an ePub, where it's more a case of packaging the font in the file rather than making it in any way inaccessible to the user?
If the licence only addresses embedding in a PDF, then that's all it covers. The licence we're talking about here specifically allows css @font-face embedding, so there's no problem using it in an epub.

ePub is designed as a delivery format. Sure, someone can jump through a couple of hoops and extract the font, but ereaders don't come with a menu option to extract the font. In exactly the same way, a webpage that uses @font-face is designed solely for the delivery of content, and browsers don't offer the option of extracting the underlying font file. But a skilled user can extract the font with ease, if they feel inclined to do so.

BTW, it is possible to extract fonts from a PDF (though some features may be missing from the result). Obviously I'm not going to explain how to do so here.

Ankh
04-11-2010, 11:48 AM
All you need to get the fonts out of an ePub file (unless it's encrypted) is a ZIP program.

That would not be much of the problem if ePub creation tools supported font subsetting (elimination of glyphs not needed for rendering of that particular content).

From what I know, only Adobe InDesign supports that feature.

woeger
04-11-2010, 01:17 PM
Thanks for all the information about the legality of embedding fonts in EPUB files. For now, I think I will stick to not embedding fonts, but that may change in the future if I have specific fonts which are legal that I may want to include inside my EPUB files.

I am just happy to have found the EPUB format, and plan to make great use of it on my website.

As more free EPUB readers begin to emerge, and as widespread use of EPUB files takes off even more with the advent of Apple (iPads for now, iPhones and iPod Touches to follow this summer with the iPhone OS 4.0 update), then we will soon likely see iTunes software for the Mac and the PC being able to view EPUB files (to keep Apple caught up with the Kindle on just about every device mantra), and this will be good news for widespread access for even more "everyday users" to be exposed to EPUB files. And maybe, this will push Amazon to add native EPUB viewing to the Kindle devices and Kindle software on Macs, PCs, iPads, and iPod Touches, and iPhones also.

I know some people on this forum do not care for Apple's implementation of iBooks and the iPad, but Apple has historically helped to revolutionize digital delivery of music (with the iPod), movies and TV shows (with iTunes), and now eBooks (with the iPad, and the soon to be released iBooks software on their other platforms). This greater exposure to users should be a win-win situation for everyone who loves eBooks and the EPUB format. Also for a 1.0 version, iBooks seems to be OK, and will likely improve over time.

Jellby
04-12-2010, 01:46 PM
Why? Obviously you shouldn't use an embedded display face for the body text, but I see no problem in overriding the slightly awkward version of Times used in Sony readers with a more appropriate body font.

Because the main body font should (in ebooks) be chosen by the user, not by the book creator. Some reading software does not allow the user to select a custom font, that is close to a "bug", and working around it by hard-coding an embedded body font only harms the software that works properly.

charleski
04-12-2010, 03:13 PM
Because the main body font should (in ebooks) be chosen by the user, not by the book creator.
Can't agree with you in the slightest. One of the main problems with current ebooks is that book creators are not choosing and embedding a font that reflects and enhances the text. Instead, if a font is embedded, it'll be CharisSIL simply because it's free and makes the text look a little different. This just reflects the 2nd-class status that ebooks currently occupy.

Those with particularly poor eyesight should be able to substitute a font that's designed for maximum clarity, but other than that I don't see any reason for the majority of users to be mucking around with the fonts.

We need to adjust the fonts now because the presentational standard of ebooks is so generally awful - that's not a state to which we should aspire.

frabjous
04-12-2010, 03:34 PM
I agree with Charleski. Choosing the fonts, even the body text fonts, most appropriate to a given work is a task that should be assigned to the publisher, and is part of the art of publishing. Indeed, I think the authors of the book should have input, feedback and even veto power into it, whenever possible. (Though responsible publishers should resist wild choices on the parts of authors.)

That said, rendering devices should have the ability to override that choice, particularly when it is necessary for people with vision problems, or the font chosen clashes with a particular display medium, but generally, the fonts chosen should be considered part of the book.

pdurrant
04-12-2010, 05:51 PM
All you need to get the fonts out of an ePub file (unless it's encrypted) is a ZIP program. What tools are required to get embedded fonts out of a PDF file?

Just the open source, cross-platform font editor, Font Forge.

pdurrant
04-12-2010, 05:53 PM
That would not be much of the problem if ePub creation tools supported font subsetting (elimination of glyphs not needed for rendering of that particular content).

From what I know, only Adobe InDesign supports that feature.

I manually subsetted a font, but only because it was a chinese font and I was using less than ten glyphs. (Font Forge did the trick.)

DaleDe
04-15-2010, 05:02 PM
Sorry, I didn't make myself clear.

If you put a font in an ePub file, then unless the book is DRM protected I can just change the file extension to ".zip", open the file with any ZIP program, and copy the font to my PC, where I can then use it in any way that I wish.

With a PDF file, on the other hand, the font really is embedded there inside the file, and I don't know of any way to get it out again.

Will a licence that is adequate to cover embedding a font in a PDF therefore be sufficient to cover its use with an ePub, where it's more a case of packaging the font in the file rather than making it in any way inaccessible to the user?

The font is easily obfuscated using the xor algorithm to meet the need for embedding. This should meet the licence requirements. You do not need to DRM the file. There are tools in this forum on how to obfuscate a font. The only problem is that ADE uses a slightly different method than the ePUB standard but for now the ADE one is the one everyone uses.

Dale

pdurrant
04-15-2010, 06:44 PM
The only problem is that ADE uses a slightly different method than the ePUB standard but for now the ADE one is the one everyone uses.

And using the Adobe method causes the ePub to fail epubcheck, no large reader supports the standard method yet, and Apple's iBooks doesn't support any embedded TTF or OTF fonts....

Apart from all that, embedded fonts are well supported :-)

Hopefully ADE will soon read IDPF obfuscated fonts, and so will iBooks.