Embedding custom fonts in ePub for use in Apple iBooks

A couple of years ago I tested embedding a custom font for eReaders, and got it to work, even in iBooks. I’m trying the same process now and this time iBooks doesn’t recognize the font. I’ve been banging my head for days (I’m an HTML developer so I’m comfortable in this space) with no luck. Here’s my current process. If someone could tell me what I’m missing that would be awesome:

  1. open ePub in Sigil

  2. copy font file (otf) into Fonts folder

  3. add to stylesheet.css:
    @font-face {src: url(…/Fonts/Writing_Stuff.otf);font-family: Handwriting; font-weight: normal; font-style:normal;}
    .handwriting, .handwriting-inline {font-family: ‘Handwriting’, Arial, Helvetica, sans-serif;}

  4. In content.opf, section, add (in angle brackets):
    item id=“Writing_Stuff.otf” href=“fonts/Writing_Stuff.otf” media-type=“font/otf”/

(At this point, the Sigil preview shows the font successfully recognized)

  1. For Apple iBooks:
    Use eCanCrusher eCanCrusher | DocDataFlow to uncompress/recompress ePub file.
    Place this file:
    Apple iBooks display options file for META-INF folder in .epub – basic settings · GitHub
    in META-INF folder (see page 13 https://itunespartner.apple.com/assets/downloads/ibookstore-asset-guide-5-0.pdf )

I figured it out! I think the most important step was the folder name needed to be lowercase: fonts, not Fonts. I also found a better tutorial for adding com.apple.ibooks.display-options.xml within Calibre: