View Single Post
Old 03-14-2011, 08:10 PM   #8
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
Quote:
Originally Posted by elizilla View Post
I took the semicolon off of the last line in every grouping, too.
For future info: not necessary to remove semi-colons for last item before the closing '}'. Absolutely necessary to include semi-colons when not the last item before '}'.

Quote:
But I still have "?wiebodzin".
It's possible that the font files you chose don't include the Eastern European characters you need. Try some more. Try the set of 4 Georgia font files in your Windows\Font directory.

Quote:
Do you think it's possible to fix this without doing that "Russification" thing?
Definitely.

Quote:
Also, if you have advice for how to more neatly edit these stylesheets, I'm interested!
There is no 'One True Way' but the attached stylesheet should work for this epub.

Have a look at the @font-face statements at the top (reproduced here):
Code:
@font-face { font-family: serif; font-weight: normal; font-style: normal; src: url(res:///Data/fonts/times.ttf);}
@font-face { font-family: serif; font-weight: normal; font-style: italic; src: url(res:///Data/fonts/timesi.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: normal; src: url(res:///Data/fonts/timesbd.ttf);}
@font-face { font-family: serif; font-weight: bold; font-style: italic; src: url(res:///Data/fonts/timesbi.ttf);}

@font-face {font-family: sans-serif; font-weight: all; font-style: all; src: url(res:///Data/fonts/Sans_Regular.ttf);}
The first 4 are your chosen serif fonts (regular, italic, bold, bolditalic). So, for example, wherever your CSS says
Code:
font-family: serif; font-style: italic;
the font file res:///Data/fonts/timesi.ttf will be used.

The fifth one specifies to use res:///Data/fonts/Sans_Regular.ttf wherever
Code:
font-family: sans-serif;
is specified in the rest of the CSS, i.e. regular is used no matter whether the CSS specifies italic and/or bold. This may or may not be desirable in general. If you want the full set of 4 like the serif then find a font with all 4 files available (e.g. Fontin is quite nice and it's free) and set up the sans-serif @font-faces to look similar to the serif @font-faces.

If you get adventurous you can do the same with monospaced fonts with a set of
Code:
@font-face {font-family: monospace; ... }
I don't know whether I'm explaining this very well but once you find your ideal font files you can use the same set of @font-face statements for every epub you want to edit. If you're a Calibre user you can put these @font-faces in the Convert - Look&Feel - ExtraCSS box. If you're not a Calibre user ignore the last sentence.

The only thing which will change by epub is where you put all the
Code:
font-family: serif;
font-family: sans-serif;
font-family: monospace;
in the rest of the css.

It could be as simple as a one-liner (after the @font-faces) saying
Code:
body {font-family: serif}
This would have the effect of rendering the whole epub in your chosen serif font as long as there aren't other contradicting font-family: statements lower down.
Attached Files
File Type: txt stylesheet2.css.txt (8.9 KB, 189 views)
jackie_w is offline   Reply With Quote