Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
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
Old 01-11-2015, 07:59 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use an absolute path if you are using extra css the conversion system has no idea how to resolve relative paths in extra css
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't reduce font size of headline using extra css scissors Recipes 5 12-23-2013 03:45 AM
add 2 different font paths in Extra CSS raykoko Calibre 2 08-17-2013 04:47 AM
CSS not applying correctly in E-Book Viewer. therealdrag0 Calibre 6 10-20-2011 11:19 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
a few extra css questions marbs Recipes 12 11-20-2010 10:15 AM


All times are GMT -4. The time now is 02:17 AM.


MobileRead.com is a privately owned, operated and funded community.