View Single Post
Old 10-17-2016, 12:19 PM   #304
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@Leonatus,

From everything you've said my guess is that url you have used in your @font-face is not quite correct for the actual internal directory structure in this particular book.
Code:
@font-face {
  font-family:"FoglihtenNo07";
  src: url(../Fonts/FoglihtenNo07_0841.otf);
  }
The above will always be correct in Sigil because Sigil always reorganises the internal files into a fixed layout, e.g. fonts always in a Fonts/ subdirectory CSS files always in a Styles/ subdirectory. In which case the code above is correct.

However, calibre does not do an automatic folder reorganisation when you open an epub. The @font-face url needs to be correct for the location of the .otf font file relative to the location of the CSS file. For example, if your CSS file is located in the parent directory of the Fonts/ subdirectory then the url would need to be coded as:
Code:
@font-face {
  font-family:"FoglihtenNo07";
  src: url(Fonts/FoglihtenNo07_0841.otf);
  }
In fact, are you even sure that your .otf file(s) are in a subdirectory at all? Because they may not be unless you've taken steps to make sure they are, e.g. by using the Editor Tools - Arrange Folders option, or by using Sigil.

Another thing to double-check. Everything is case-sensitive, e.g. Fonts/ is not the same as fonts/ - so make sure your url reflects actual file and directory names.

Last edited by jackie_w; 10-17-2016 at 12:29 PM. Reason: Tools - Arrange folders
jackie_w is offline   Reply With Quote