Custom Fonts Not Showing Up When I Compile ePub

I’m feeling defeated trying to get a custom font to translate when I compile. I’m compiling to ePub eBook 3, which has given me the best results. However, my chapters have custom fonts that just won’t show up no matter how I compile it. I’ve tried changing all of the section layouts to the font I want - no luck. I’ve tried compiling as is - no luck. I’ve had success compiling as a pdf, but I really need my chapters hyperlinked and I don’t want to have to covert over to .epub. Any advice?

For legal reasons Scrivener doesn’t embed fonts to epub.
If you succeed, it won’t be through compile.

1 Like

That’s a huge bummer. Sounds like they should limit the font options then instead of giving users the illusion of choice.

You might just be right about that.

Search the web, I know it can be done using Sigil or the likes, after the fact.
But know that if you don’t own the right to use the font, you might get in some degree of trouble.

1 Like

Scrivener correctly embeds the name of the specified font. It’s then up to the reader to honor that specification or not, which will in part depend on whether the reader has the requested font installed.

1 Like

If this is the case, why am I unable to see the font when it’s installed on my computer?

It’s my own handwriting so I’ll be okay lol

Make sure your ereader is set to display the defined fonts etc.

I’m viewing .epub through my PDF reader on my PC, which has honored font selections in the past.

Use Sigil (it’s free), have a look at the guts of one that works vs this one that refuses to.

2 Likes

I know I can include them as images, but I hate that if someone is reading in dark mode they’ll show up with white backgrounds. Ugh. I’ll look at Sigil, thank you!

1 Like

So, getting publisher fonts in an e-book is a bit tricky:

You’ll have to

  • add the font files to a fonts directory using Sigil (or another e-book editor)
  • declare the presence of the fonts and their variants (bold, italic, bolditalic) in the Stylesheet.
  • Call the font-family from the classes in the stylesheet
  • Check for any encryption of the font files and remove that if it exist (which is illegal, but not relevant in this case)
  • Check for inconsistencies in capitalisation of the file names in the declarations
  • Check for inconsistencies in the capitalisation of the font-family names in the classes
  • Get the path to the font files exactly right (open the e-book in 7-zip to determine the structure of the e-book, no need for renaming to zip)
  • Get the names and paths of the font files right in the Manifest (content.opf)
  • Get the media type of the font files right in the Manifest (different for each type of font)

Pagina EPUB-Checker will provide sensible error messages with line and column numbers.

There’s a lot that can go wrong embedding font in e-books.
And then the reader chooses not to select the Publisher’s fonts in their e-reader options and all this work is moot. :wink:

Nice to have a font of your own handwriting, though.

3 Likes