digital typography: font management - ebookcraft 2016 - champagne choquer
TRANSCRIPT
Font Embedding Meets
The Hero’s Journey
The Font Embedder’s
Journey
Or...
What is the hero’s journey?
The Narrative Arch of the Font Embedder’s Journey
You are a hero.
You just might not know it yet...
The Font Embedder’s Journey: The Ordinary World
The status quo, preset ebook design
The Font Embedder’s Journey: The Call to Adventure
The Font Embedder’s Journey: The Refusal of the Call
Maybe you shouldn’t embed fonts?
• Technical and admin overhead
• Added cost of premium ebook fonts
• Time spent becoming a lawyer to understand
the nuances of font licenses
• Font embedding support is notoriously spotty
• Frustration
time = $$
$$ = $$
But you’re a hero — You have to take up the call!
(Typography hero pictured above)
The Font Embedder’s Journey: Crossing the Threshold
Of course you should embed fonts:
• User experience
• Branding
• Differentiate your product
• Print and ebook consistency
• Compelling page designs
• Special character support
• See Charles Nix for more reasons
...Plus, be the hero of your ebook odyssey!
The Font Embedder’s Journey: Meeting the Mentor
#eprdctn
ebookcraft
Liz Castro & Pigs, Gourds & Wikis
EPUB Secrets
eBOUND
BISG
The Font Embedder’s Journey: Meeting the Mentor
OBrady Wan Kenobi(AKA the lovely and wise Laura Brady)
The Font Embedder’s Journey: The First Challenge
Finding the right fonts
Barriers to font embedding: • End User License Agreements (EULAs)
• Pricing
• Lack of support
• To encrypt or not
• e-reader display issues
The Font Embedder’s Journey: The First Challenge
End User License Agreements (EULAs)
• Font libraries are likely limited to use
in print books
• New licenses need to be purchased
for use in ebooks (if available)
• Most font EULA restrict “distribution”
— without using font encryption,
ebooks are considered to be
distribution
• Do not include paid fonts in ebooks,
even when using font encryption,
unless explicitly approved in the EULA
or by the font foundry directly
The Font Embedder’s Journey: The First Challenge
What to look for in font EULAs:
When purchasing a font, look for explicit language regarding ebooks:
• ebook font licensing
• Font embedding
• EPUB/ebook embedding
The Font Embedder’s Journey: The First Challenge
Be careful, even free fonts have EULAs...
Read the license thoroughly.Look for fonts that allow:
• (re)Distribution
• Extraction
• Downloads
• Modification
Open source font licenses:
• SIL International Open Font License (OFL)
• Apache License
• Creative Commons
• GNU Public License
The Font Embedder’s Journey: The First Challenge
Where to find fonts:
Open Source Fonts:
• Google Web Fonts
• League of Moveable Type
• Font Squirrel
Premium options: (require encryption)
• Fontspring
• MyFonts
The Font Embedder’s Journey: The First Challenge
What a good premium license looks like:
The Font Embedder’s Journey: The First Challenge
Font formats:
For font embedding in ebooks there are two formats to worry about: OTF and TTF.
TrueType (.ttf) Although not listed in the spec, some e-readers support the use of TrueType fonts. Widely used in print and web documents, this format also supports the Unicode range.
OpenType (.otf): This format is recommended in the epub3 spec. It is also widely used for print and web. The format was created by Adobe and Microsoft and supports the full Unicode range of characters.
The Font Embedder’s Journey: Temptation
Using fonts without a proper license
Adobe fonts can be embedded into
ebooks if you have a Creative Cloud
membership.
BUT, these fonts must be encrypted.
If you aren’t encrypting the fonts, you
need to change your typeface.
This goes with other premium, too.
The Font Embedder’s Journey: The Dark Inner Moment
This is that time when you have a font, but you contemplate whether or not it’s worth the hassle to come...
The Font Embedder’s Journey: The Final Battle
The Battle: Embedding Fonts
• From InDesign with encryption
(For premium fonts or fonts
with EULA restrictions)
• From InDesign and removing
encryption
(Open license fonts required)
• Hand coding with @font-face
(Open source license required) Wherein font rendering can be as bad as You Know Who...
The Font Embedder’s Journey: The Final Battle
Exporting from InDesign with Encryption
• When exporting a font with embeddable
fonts, InDesign encrypts (mangles) the
font files and includes an encryption.xml
file to the META-INF folder.
• It creates a “fonts” folder within the
OEBPS folder, and attaches your
encrypted font files
• It adds the font information to your CSS.
• Fonts are listed in the CSS file under @
font-face rule and in paragraph <p> style
and character <span> styles.
• It also declares all of the font files in the
content.opf file
The Font Embedder’s Journey: The Final Battle
Content.opf file:
Font media types: More confusion!
Even if your font is a TrueType font, with a .ttf extension, it is most
likely an OpenType font.
So, in the manifest, we will include the media type as
“application/vnd.ms-opentype”
If this media-type doesn’t work, try
“application/font-sfnt”
<item id=”OpenSans-Bold.ttf” href=”font/OpenSans-Bold.ttf” media-type=”application/vnd.ms-opentype” />
The Font Embedder’s Journey: The Final Battle
Removing encryption from InDesign
• Delete the encryption.xml file from the
META-INF folder.
• Delete the fonts in the Fonts folder and
replace them with original font files.
• Ensure that the @font-face CSS calls and
the Content.opf file links match the font file
names.
The Font Embedder’s Journey: The Final Battle
Adding fonts from scratch:
You will need to add fonts to the following locations
• Add the fonts to CSS using the @font-
face format
• Add the fonts to your font stacks for
different paragraph styles
• Create a “font” folder within the
OEBPS folder
• Add links to the content.opf file point-
ing to the proper location (OEBPS >
font > “Proper file name”
The Font Embedder’s Journey: The Final Battle
Fix for Apple iBooks
When embedding font for iBooks, whether encrypted or not, there is added code.
Luckily, InDesign now adds this meta-property tag for us:
The Font Embedder’s Journey: The Final Battle
Font stacks (aka graceful degradation)
• To do this, you will need to evaluate
e-reader fonts and decide which pair best to
your design.
• Add font stacks in your CSS under any class
definition
• Place fonts in descending order, with your
most desirable fonts at the start and generic
font types, such as “serif” or “sans-serif”, at
the end.
The Font Embedder’s Journey: The Final Battle
Issues (aka collateral damage)
• Font embedding is spotty, so it requires a
lot of testing across devices
• If a font isn’t licensed for EPUB, InDesign
will strip our the fonts and botch your
designs
• Some e-readers just suck—It’s not you
it’s them.
The Font Embedder’s Journey: The Final Battle
Testing, testing, 1-2-3...
The Font Embedder’s Journey: The Final Battle
Victory! Success!
The Font Embedder’s Journey: The Journey Home
You are Celebrated as the Hero You Are!
(If only in your mind)
You are a hero.