View Single Post
Old 01-11-2015, 06:25 AM   #1
iliakan
Member
iliakan began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2015
Device: iphone 6
Font from extra-css is not looked-up correctly

When @font-face is in external css, it is not embedded correctly.

I tried to make the examples as simple as possible.

html file 1.html:
Code:
<div class="font-test">!</div>
css file my.css:
Code:
  @font-face {
    font-family: 'FontIcons';
    src: url("icons.otf") format('opentype');
    font-weight: normal;
    font-style: normal;
  }

  .font-test {
    font-family: 'FontIcons';
  }
conversion:
Code:
ebook-convert 1.html 1.epub --extra-css=/Users/iliakan/font/my.css --embed-all-fonts -vv
output:
Code:
...
Failed to find fonts for family: FontIcons not embedding
The full example is at http://ilyakantor.ru/font.zip.

P.S. Things work if I include CSS in link tag in HTML. Guess extra-css leads to another search algorithm? The font is in the same directory as my.css.
iliakan is offline   Reply With Quote