Body: <p>I have this folder structure:</p>
  <pre><code>./Fonts/chimod.otf
  ./Styles/style.css
  ./Text/main.xhtml
  content.opf
  toc.ncx
  </code></pre>
  <p>Here is the content.opf:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;
  &lt;package xmlns=&quot;http://www.idpf.org/2007/opf&quot; unique-identifier=&quot;bookid&quot; version=&quot;2.0&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;
    &lt;metadata xmlns:opf=&quot;http://www.idpf.org/2007/opf&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  
      &lt;!-- ISBN --&gt;
      &lt;dc:identifier id=&quot;bookid&quot; opf:scheme=&quot;ISBN&quot;&gt;urn:isbn:971-1-911701-61-8&lt;/dc:identifier&gt;
      &lt;dc:title&gt;Title&lt;/dc:title&gt;
      &lt;dc:rights&gt;Copyright © 2020 Foo. All rights reserved.&lt;/dc:rights&gt;
  
      &lt;!-- BISAC Subject Headings List: http://bisg.org/?page=BISACFaQ --&gt;
      &lt;dc:subject&gt;Religion / Philosophy / Nature&lt;/dc:subject&gt;
  
      &lt;!-- https://www.loc.gov/marc/relators/relacode.html --&gt;
      &lt;dc:creator opf:file-as=&quot;Foo&quot; opf:role=&quot;bkd&quot;&gt;Foo&lt;/dc:creator&gt;
  
      &lt;dc:publisher&gt;Foo&lt;/dc:publisher&gt;
      &lt;dc:date opf:event=&quot;publication&quot;&gt;2020-07-14&lt;/dc:date&gt;
  
      &lt;!-- Language code: http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes --&gt;
      &lt;dc:language&gt;en&lt;/dc:language&gt;
  
      &lt;meta name=&quot;cover&quot; content=&quot;[COVER_NAME].jpg&quot; /&gt;
  
      &lt;!-- UUID generator: http://www.famkruithof.net/uuid/uuidgen --&gt;
      &lt;dc:identifier opf:scheme=&quot;UUID&quot;&gt;urn:uuid:7d6649a0-c5cb-1aea-8b6e-08a020ac9a66&lt;/dc:identifier&gt;
    &lt;/metadata&gt;
    &lt;manifest&gt;
      &lt;item id=&quot;css-fonts&quot; href=&quot;Styles/style.css&quot; media-type=&quot;text/css&quot; /&gt;
      &lt;item href=&quot;Text/main.xhtml&quot; id=&quot;main&quot; media-type=&quot;application/xhtml+xml&quot; /&gt;
      &lt;item href=&quot;Fonts/chimod.otf&quot; id=&quot;chimod.otf&quot; media-type=&quot;application/opentype&quot; /&gt;
      &lt;item href=&quot;toc.ncx&quot; id=&quot;ncx&quot; media-type=&quot;application/x-dtbncx+xml&quot; /&gt;
    &lt;/manifest&gt;
    &lt;spine toc=&quot;ncx&quot;&gt;
      &lt;itemref idref=&quot;main&quot; /&gt;
    &lt;/spine&gt;
    &lt;guide&gt;
      &lt;reference href=&quot;Text/main.xhtml&quot; type=&quot;text&quot; /&gt;
    &lt;/guide&gt;
  &lt;/package&gt;
  </code></pre>
  <p>Here is the style:</p>
  <pre><code>@font-face {
    font-family: Zh;
    font-weight: normal;
    font-style: normal;
    src: url(../Fonts/chimod.otf) format('otf');
  }
  
  @page {
    margin: 0;
    padding: 0;
    size: 178mm 254mm;
    color: #333;
  }
  
  body {
    font-family: Zh;
    color: #333;
  }
  </code></pre>
  <p>Here is the HTML:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;no&quot;?&gt;
  &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot;
  &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
  
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
      &lt;title&gt;Title&lt;/title&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;../Styles/style.css&quot;/&gt;
    &lt;/head&gt;
    &lt;body&gt;&lt;span class=&quot;f-zh q&quot;&gt;二&lt;/span&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  <p>Why isn't the font loading and displaying when I open the Epub?</p>
  <p>I am compiling with this: <a href="https://github.com/javierarce/epub-boilerplate" rel="nofollow noreferrer">https://github.com/javierarce/epub-boilerplate</a>. I customized that to get it working. Getting no errors about resources not found. The font is the Chinese google noto font.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-14T14:45:22.703Z
Comments.Text: Have you validated the epub with epubcheck? What are the results? IIRC, when you use embedded fonts, it throws up some INFO/WARNINGS, but the file still validates. I assume you have checked your file paths already to make sure that is correct.
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-14T14:52:15.163Z
Comments.Text: I haven't used an otf font file, but what you have looks basically correct. (I use TTF instead).  You should try another font just to see what happens... The problem may lie with the reading system you use to test render or the font itself, so it's important to rule these out... What you have looks correct so far.
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-14T14:53:02.677Z
Comments.Text: I think what you did looks correct already, but you might find this reference to be useful https://github.com/JayPanoz/Soma/wiki/How-to-embed-fonts
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-14T14:55:57.223Z
Comments.Text: I used Mac Books to render if that matters.
Comments.UserDisplayName: Lance Pollard
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-15T15:03:49.427Z
Comments.Text: Because you did not give me the output of epubcheck, there is no way to answer the question.  My guess is that you used a wrong file path.
Comments.UserDisplayName: idiotprogrammer
Tags: <fonts>
Title: Font not loading in Epub
UserDisplayName: Lance Pollard
ThreadText: # Font not loading in Epub
  
  (Asked by: username_0 on 2020-07-14)
  
  I have this folder structure:
  ./Fonts/chimod.otf
  ./Styles/style.css
  ./Text/main.xhtml
  content.opf
  toc.ncx
  
  Here is the content.opf:
  
  
    
  
      
      urn:isbn:971-1-911701-61-8
      Title
      Copyright © 2020 Foo. All rights reserved.
  
      
      Religion / Philosophy / Nature
  
      
      Foo
  
      Foo
      2020-07-14
  
      
      en
  
      
  
      
      urn:uuid:7d6649a0-c5cb-1aea-8b6e-08a020ac9a66
    
    
      
      
      
      
    
    
      
    
    
      
    
  
  
  Here is the style:
  @font-face {
    font-family: Zh;
    font-weight: normal;
    font-style: normal;
    src: url(../Fonts/chimod.otf) format('otf');
  }
  
  @page {
    margin: 0;
    padding: 0;
    size: 178mm 254mm;
    color: #333;
  }
  
  body {
    font-family: Zh;
    color: #333;
  }
  
  Here is the HTML:
  
  
  
  
    
      Title
      
    
    二
  
  Why isn't the font loading and displaying when I open the Epub?
  I am compiling with this: https://github.com/javierarce/epub-boilerplate. I customized that to get it working. Getting no errors about resources not found. The font is the Chinese google noto font.
  
  **Tags:** fonts
  
  > **Comments:**
  > **username_1**: Have you validated the epub with epubcheck? What are the results? IIRC, when you use embedded fonts, it throws up some INFO/WARNINGS, but the file still validates. I assume you have checked your file paths already to make sure that is correct.  
  > **username_1**: I haven't used an otf font file, but what you have looks basically correct. (I use TTF instead).  You should try another font just to see what happens... The problem may lie with the reading system you use to test render or the font itself, so it's important to rule these out... What you have looks correct so far.  
  > **username_1**: I think what you did looks correct already, but you might find this reference to be useful https://github.com/JayPanoz/Soma/wiki/How-to-embed-fonts  
  > **username_0**: I used Mac Books to render if that matters.  
  > **username_1**: Because you did not give me the output of epubcheck, there is no way to answer the question.  My guess is that you used a wrong file path.  
  
  ---
  
  ## 0 answers
  
  