View Single Post
Old 06-20-2012, 12:25 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by iain robinson View Post
Hi all

I've made an ePUB file from Adobe Indesign which I have since done a fair amount of work to. It validates okay and displays as expected.

Now the customer wants us to try and use the fonts from the print edition in the ePUB. Fair enough, I know how, but I've got a problem. I have manually embedded one font (Open Sans, a Google Web Font) and the code I have added makes it display okay in Chrome and seems to display in ADE too. Trouble is, it displays as bold in ADE (it's a semi-bold font and displays as such in Chrome). I copied the "font-style: normal; font-weight: 600;" code from the GWF website - the 600 denotes the semi-bold variant.

The CSS code is as follows;
Code:
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 600;
src : url(fonts/OpenSans-Semibold.ttf);
}

p.A-head-article-title {
font-family: "Open Sans", sans-serif;
letter-spacing: -0.05em;
word-spacing: 0.06em;
font-size: 2em;
color: black;
-webkit-hyphens:none;
margin-top: 0em;
margin-bottom: 0.5em;
}
Anyone got any thoughts? I know the client will be previewing the files in ADE.

thanks,
Iain
Couple of things...First, the code needs fixing...

Code:
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: normal;
src : url(fonts/OpenSans-Semibold.ttf)
}

p.A-head-article-title {
font-family: "Open Sans", sans-serif;
font-size: 2em;
color: black;
-webkit-hyphens:none;
margin-top: 0;
margin-bottom: .5em
}
What could be happening is that the semi-bold font is displaying correctly and it just a bit bolder then you expected. You cannot base anything on Chrome. That just doesn't count. Is this the only font you have embedded? Do you have a bold variety? If you do, then it could be an encoding issue. ADE can be picky about this. I've had this happen before where I've embedded a full font family and where normal should have been used, I got bold. Get a copy of Notepad++, load in all the files (CSS, OPF, ncx, XML) and make sure the encoding of every file is UTF-8 without BOM. Once that's done, put them all back in the ePub and try it again in ADE.
JSWolf is offline   Reply With Quote