View Single Post
Old 01-11-2015, 11:10 AM   #1
iliakan
Member
iliakan began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2015
Device: iphone 6
@font-face is not embedded

Sorry for the 3rd similar topic, but I'm struggling with embedding the custom font for the whole day and even more.

Again tried to make the problem as simple as possible.

Right now I have the following simple thing and it doesn't work:

Code:
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<style>
@font-face {
    font-family: FontIcons;
    src: url(icons.otf) format("opentype");
    font-weight: 400;
    font-style: normal
}
</style>
</head>
<div style="font-family:FontIcons">!</div>
</body></html>
The browser shows it right, but epub does not get the font.

I convert it like:
Code:
ebook-convert /tmp/a/3.html 3.epub --embed-all-fonts  -vv

The output contains this:
Code:
...
Parsing 3.html ...
Added /tmp/a/icons.otf
But no message about "embedding" the font.

The 3.epub has the icons.otf file, but does not show up the font symbol.

The full example (html + css + epub) http://ilyakantor.ru/font.zip
iliakan is offline   Reply With Quote