Quote:
Originally Posted by GJ Coop
I have not yet succeeded with getting the font to embed despite changing to a couple of different Google Webfonts, that's .ttf fonts. One font became distorted so it looked like the hanging letters were dripping down the page in the .mobi in the desktop previewer, might have been tears, or blood. OK, for a crime book, I guess.
|
Sounds like a problem with the ascender/descender height not being calculated correctly, combined with an overly aggressive font renderer that tries to make lowercase letters taller for "increased" legibility. I've seen this myself. It's usually fixable by correcting the ascender/descender heights and other per-font metrics. That said, it could also be bad hinting.
Quote:
Originally Posted by Hitch
Ah. Sorry, I misunderstood. I thought you meant six faces. DUHR. (Havign said this: I kid my fellow MR'ers not: we had a book come in today with NINETEEN FONTS. 19! Ye gods! I'm going to be trying to talk this guy down for a while, I can tell.)
|
Assuming you mean 19 font files and not 19 font families, that doesn't seem extreme at all to me, so long as they're used sensibly to distinguish different types of content. For example:
- Title page font family [plain, italic, bold]
- Chapter number font family [plain]
- Drop cap font family [plain or bold]
- Small cap font family [plain, bold, italic, bold italic]
- Body font family [plain, italic, bold, bold italic
- Block quote/sidebar heading font family [bold]
- Block quote/sidebar font family [plain, bold, italic, bold italic]
- Blank font for a warning that is visible only if the reader overrides your fonts
And you're up to 19 without even doing anything particularly unusual or heinous. That's not even counting fonts that replace missing glyphs in other fonts, for complying with font licenses that don't allow modifications....
What matters is not the number of fonts, but whether they're used sensibly. A work that changes fonts willy-nilly is going to look stupid even if you only have two or three fonts. A work that changes fonts in reasonable ways that make sense given the structure of the content is going to still look reasonable even if there are twenty fonts.
Quote:
Originally Posted by JSWolf
Your @font is incorrect. This is how you have it.
Code:
@font-face {
font-family: "Abel";
font-style: normal;
font-weight: normal;
src: url("../Fonts/Abel-Regular.ttf") format("truetype");
}
And this is what is correct
Code:
@font-face {
font-family: "Abel";
font-style: normal;
font-weight: normal;
src: url("../Fonts/Abel-Regular.ttf")
}
As long as "../Fonts/Abel-Regular.ttf" is correct then it should work. You do not put the font format type in the src: line or any line in the CSS style.
|
There's nothing wrong with specifying the format in an @font-face src declaration:
http://www.w3.org/TR/css3-fonts/#descdef-src
It is strongly recommended for web content, but it matters very little for on-disk content, because the files are already downloaded. Either way, I can't imagine it hurting anything.