View Single Post
Old 07-29-2010, 11:48 AM   #1
jdittric
Edge User
 
Angry cyrillic fonts in epub

Hi,

I'm trying to read eBooks that are in Russian and therefor need the cyrillic font support. But when I just try to read one, I get only question marks. The Author on the top left and the book title are display correct, but the text not. I've to use a workarounds, that includes the fonts (LiberationSerif-*.ttf) and add the following extra style-sheet information:

Code:
		@font-face {
    font-style: italic;
    font-family: "Liberation Serif", serif, sans-serif;
    font-weight: normal;
    src: url(LiberationSerif-Italic.ttf)
    }

		@font-face {
    font-style: normal;
    font-family: "Liberation Serif", serif, sans-serif;
    font-weight: normal;
    src: url(LiberationSerif-Regular.ttf)
    }

		@font-face {
    font-style: italic;
    font-family: "Liberation Serif", serif, sans-serif;
    font-weight: bold;
    src: url(LiberationSerif-BoldItalic.ttf)
    }
That is not really nice, because the epub files are at least 550kB bigger.

So I tried to insert just the following CSS code:

Code:
@font-face { 
font-family: "DroidFont", serif, sans-serif; 
font-weight: normal; 
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf); 
} 
@font-face { 
font-family: "DroidFont", serif, sans-serif; 
font-weight: bold; 
font-style: normal; 
src: url(res:///system/fonts/DroidSansFallback.ttf); 
} 
@font-face { 
font-family: "DroidFont", serif, sans-serif; 
font-weight: normal; 
font-style: italic; 
src: url(res:///system/fonts/DroidSansFallback.ttf); 
} 
@font-face { 
font-family: "DroidFont", serif, sans-serif; 
font-weight: bold; 
font-style: italic; 
src: url(res:///system/fonts/DroidSansFallback.ttf); 
}
but the result are the above mentioned question marks. The path to the font is correct (I tried to use the LiberationSerif on /sdcard/, but it didn't work as well), what am I doing wrong?

Best regards,

jdittric