View Single Post
Old 01-08-2016, 02:11 PM   #1
Psymon
Chief Bohemian Misfit
Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.
 
Psymon's Avatar
 
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
Embedded fonts & italics

Hey folks! Been quite a while since I did any ebooking, but this past week I thought I'd have a little fun with one, and ran into an odd issue.

I wanted to embed this font into my book...

http://www.1001fonts.com/minya-nouvelle-font.html

...and it's nice that it comes with bold and italic versions, and naturally I want those to be used wherever applicable. And so I embedded the regular, bold and italic versions of the fonts in my CSS...

Code:
@font-face {
    font-family: "minya-reg";
    font-weight: normal;
    font-style: normal;
    src: url("../Fonts/minya-reg.ttf") format("truetype");
    -webkit-hyphens:none;
    -epub-hyphens:none;
    -moz-hyphens:none;
    hyphens:none;
    -moz-font-feature-settings: "hist=1, liga=1, dlig=1";
    -ms-font-feature-settings: "hist", "liga", "dlig";
    -webkit-font-feature-settings: "hist", "liga", "dlig";
    -o-font-feature-settings: "hist", "liga", "dlig";
    font-feature-settings: "hist", "liga", "dlig";
}

@font-face {
    font-family: "minya-bd";
    font-weight: normal;
    font-style: normal;
    src: url("../Fonts/minya-bd.ttf") format("truetype");
    -webkit-hyphens:none;
    -epub-hyphens:none;
    -moz-hyphens:none;
    hyphens:none;
    -moz-font-feature-settings: "hist=1, liga=1, dlig=1";
    -ms-font-feature-settings: "hist", "liga", "dlig";
    -webkit-font-feature-settings: "hist", "liga", "dlig";
    -o-font-feature-settings: "hist", "liga", "dlig";
    font-feature-settings: "hist", "liga", "dlig";
}

@font-face {
    font-family: "minya-it";
    font-weight: normal;
    font-style: normal;
    src: url("../Fonts/minya-it.ttf") format("truetype");
    -webkit-hyphens:none;
    -epub-hyphens:none;
    -moz-hyphens:none;
    hyphens:none;
    -moz-font-feature-settings: "hist=1, liga=1, dlig=1";
    -ms-font-feature-settings: "hist", "liga", "dlig";
    -webkit-font-feature-settings: "hist", "liga", "dlig";
    -o-font-feature-settings: "hist", "liga", "dlig";
    font-feature-settings: "hist", "liga", "dlig";
...and then specified the reg version as my base font..

Code:
html>body {
	font-family: minya-reg, 'Times New Roman', Times, serif;
	font-size: 124%;
}

body {
	font-family: minya-reg, 'Times New Roman', Times, serif;
	font-size: 100%;
	line-height: 138%;
}
...and then specified that when <b> or <i> were used, that the appropriate font would be used, too...

Code:
b {
	font-weight: bold;
	font-family: "minya-bd";}

i {
	font-style: italic;
	font-family: "minya-it";}
}
While I'm working on the book in Sigil, everything seems just fine (as far as I can tell), but when I open it up in ADE, for some reason the italic font doesn't want to load -- although the bold one does just fine -- and so anything in italics comes out instead like Times New Roman (or something).

I've attached here a little test file I made, if you want to take a look at it in ADE or whatever and "see" the problem.

Thanks in advance, once again!
Attached Files
File Type: epub font test.epub (185.0 KB, 249 views)
Psymon is offline   Reply With Quote