Quantcast
Channel: MobileRead Forums - Conversion
Viewing all articles
Browse latest Browse all 3900

Font from extra-css is not looked-up correctly

$
0
0
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.

Viewing all articles
Browse latest Browse all 3900

Trending Articles