background preloader

Epub

Facebook Twitter

How to embed fonts in ePub files | Safari Blog. (You may be interested in the earlier article, When to embed fonts in ePub files.) Font selection Font formats and licensing are complicated. The ePub specification recommends that book designers and reading system implementers use OpenType fonts when possible (although TrueType fonts remain more common). If your font ends in a .otf extension, it’s an OpenType font. Licensing Font licenses may allow you to use the font in printed collateral or even digital documents, but may not allow you to embed that font for distribution elsewhere.

One method to allow font inclusion without violating any license is to employ font obfuscation. Fonts with open licenses My preferred solution for bundling fonts is to dodge the entire licensing issue altogether by using an open license. My favorite fonts in terms of good Unicode support combined with an open license are the Liberation series. How to embed a font If you’re not afraid of specs, I recommend reviewing the CSS2 @font-face rule. 0. 1. 2. 3. 4. Com.apple.ibooks.display-options. Embedding Fonts in EPUB- iPad, iPhone AND nook. I don't know how I missed this.

I did see that Apple had published a new iBookstore Assets guide in late March, and I looked through the “changes in version 4.6” section pretty closely. But today I noticed something new: iBooks now supports embedded fonts even in regular, reflowable, non-fixed layout EPUBs. That's not all. I noticed while I was testing this feature that Apple no longer restricts embedded fonts to non-special tags, as I describe on page 140 of my EPUB book. This is a really big deal, and means you can forget the ugly hacks previously required to get them to appear.

And, and, and that's still not all. Here's how to embed fonts into an EPUB book: First, add the font to your book files in the normal way, by adding an @font-face statement at the beginning of your CSS, something like this: That makes the font available. And then make sure your HTML actually uses one of those styles:<p class="letter">Warren Cty Ky March 11th</p> The file should have a line like this one:

It's time to treat ebook developers as developers. One of the biggest surprises to those of us who come to ebook development from the web development side of things is the scarcity of documentation. For years we’ve come to rely on the extensive documentation and information provided by each browser vendor and to come from that to a field where documentation is either non-existent or hidden behind non-disclosure agreements is a massive culture shock. More than that, the situation prevents us from doing our jobs and holds back ebooks as a business. The situation The best ebook developers get today are a hodgepodge of ‘best practices’ guides whose sections on CSS consist mostly of don’t-do-thats, really-don’t-do-thats, and don’t-even-think-about-doing-thats.

Apple’s guide is limited to only those registered to publish with them directly, which requires both a U.S. tax number and an ISBN number and is only released under a non-disclosure agreement. And both Apple’s and Amazon’s guide are insufficient as documentation. Ambiguity is intolerable. Understanding Apple’s fixed-layout EPUBs. iBooks now supports an extension to EPUB that allows publishers to create books with precise layout using CSS. This is Apple’s own extension, not part of the EPUB specification itself (and not one that they suggested be included in EPUB3).

The goal of this post is to simply document the extension and show how to create new works with it. I’m not going to debate whether it’s a good thing for the ecosystem here. Install Phone Disk Anyone working extensively with iBooks EPUB development should first grab a copy of the invaluable Phone Disk. This allows Mac and Windows computers to browse most of the iOS device filesystem as a normal drive, including opening and inspecting EPUB books.

Download a fixed-layout EPUB sample from the iBookstore iBooks samples do not have DRM and so can be opened and read normally. Find the display-options file The key component of the extension is the addition of the file META-INF/com.apple.ibooks.display-options.xml. 1. <? 2. 3. 4. 5. 6. Inspect the OPF and NCX 1. Yes! PHP ss_zip Class. EPUB Validator (beta) ZIP format specification. Build a digital book with EPUB. Before you start This tutorial guides you through creating eBooks in the EPUB format. EPUB is an XML-based, developer-friendly format that is emerging as the de facto standard for digital books. But EPUB isn't just for books: With it, you can: Bundle documentation for offline reading or easy distributionPackage blog posts or other Web-native contentBuild, search, and remix using common open source tools About this tutorial You start this tutorial by generating an EPUB book manually to help you learn all the components and required files.

Then, it covers generating EPUB from DocBook XML—one of the most widely used standards for technical documentation—and how to use Python to completely automate EPUB creation with DocBook from end to end. Objectives In this tutorial, you: Prerequisites No particular operating system is assumed for this tutorial, although you should be familiar with the mechanics of creating files and directories. System requirements Back to top About the EPUB format What is EPUB?