Thread: verifying html
View Single Post
Old 08-29-2010, 10:40 PM   #18
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by JaneFancher View Post
This paragraph had four style codes, font size, font type, italics and an sgc_1 code that I think Sigil puts in. Once I had everything but the font type out, viola! BlackChancery appeared. Wheeee. I tried Arabella...and there it was. Wheeeee. Now, I began adding the other code back in. Font size went in OK. But if either the italics code or the sgc code was in, the font disappeared again.
In your css you defined the font as:
@font-face {
font-family: "BlackChancery";
font-style: normal;
font-weight: normal;
src:url(../Fonts/BlackChancery.ttf) format(opentype);;
}
So that's telling the renderer that this font file corresponds to the normal weight and normal style of the BlackChancery font. But then in your xhtml you tell it you want the text rendered in BlackChancery italic. The renderer looks at the fonts it has available and finds that none correspond to BlackChancery italic, so it falls back to the default font.

I'm afraid this is a case of computers having the irritating habit of trusting that you mean what you tell them .

You don't need to include the font-style and font-weight attributes, they're used when you embed different font files for the same family so that you get proper bold and italics. If you want to use both BlackChancery roman and BlackChancery italic you need to embed two font files, one for each style, give them the same font-family name, and indicate the difference through the font-style attribute.

Last edited by charleski; 08-29-2010 at 10:52 PM.
charleski is offline   Reply With Quote