Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
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
Old 01-11-2015, 03:40 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,472
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I see your font symbol in ADE 1.7. (You do seem to be missing the <body> in 3.html)
PeterT is offline   Reply With Quote
Advert
Old 01-12-2015, 02:29 AM   #3
iliakan
Member
iliakan began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2015
Device: iphone 6
Please consider the question solved.

For others who meet the similar problem: that was iBooks bug.

Actually I met 2 iBooks bugs:

1) Custom font char with low char code (like ! replaced with a custom char) is not shown.

2) Monospace font is not applied to <span> inside <code> even if forced with CSS rules.

These look purely like iBooks bugs, I used Sigil & analyzed the structure with unzip to make sure that the book is ok.

P.S. I found a small issue in ebook-converter too.
It doesn't cut the query part from url links like url('my.tff?123'), so the font could not be found in some of my cases. But if that's an url, the resolving algorithm could take it into account.
iliakan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
@media amzn-kf8 and @font-face phossler Calibre 2 12-21-2013 11:25 AM
Embedding font in books that already have embedded font Barty Calibre 2 10-16-2013 11:38 PM
Mini advanced font settings ignored in one book - embedded font? lordofazeroth Kobo Reader 4 09-20-2013 02:15 PM
Am I using @font-face correctly? phossler Sigil 12 11-30-2012 04:38 PM
embedded font - now line with embedded font not re-flowing Kaylee Skylyn ePub 23 08-09-2012 07:30 PM


All times are GMT -4. The time now is 01:43 AM.


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