Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Android Devices > enTourage eDGe > enTourage Archive

Notices

 
 
Thread Tools Search this Thread
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
 
Old 07-29-2010, 01:38 PM   #2
nprnncbl
Edge User
 
I don't know what may be wrong, but the way I dealt with missing characters was to use fontforge and python on Linux to copy and paste characters from a font that had those characters into the Droid fonts, which lacked them. Then I replaced the Droid fonts on the EE, and it works.
 
Advert
Old 07-29-2010, 01:49 PM   #3
jdittric
Edge User
 
Could you give me a few more hints how to do all that.

I think that it is not possible, to change the droid font on the eDGe, because I don't know, wether it is possible to do that without having root access.
 
Old 07-30-2010, 03:17 AM   #4
keng2000
Edge User
 
I have noticed in other epub ccs.
They use one quote ( ' ) instead of ( " )
and
source url with quote also,,,,
 
Old 07-30-2010, 10:25 AM   #5
nprnncbl
Edge User
 
You're right that you need root access to change the Droid font. If you've enabled root access, and if you have a Linux PC for running fontforge, I can walk you through the process. If you're new to Linux, it might be a little tricky.
 
Advert
Old 07-30-2010, 11:36 AM   #6
jdittric
Edge User
 
Quote:
Originally Posted by nprnncbl View Post
You're right that you need root access to change the Droid font. If you've enabled root access, and if you have a Linux PC for running fontforge, I can walk you through the process. If you're new to Linux, it might be a little tricky.
I've linux. How do I root the edge?
 
Old 07-30-2010, 11:38 AM   #7
jdittric
Edge User
 
Quote:
Originally Posted by keng2000 View Post
I have noticed in other epub ccs.
They use one quote ( ' ) instead of ( " )
and
source url with quote also,,,,
I tried that

Code:
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: normal; 
font-style: normal;
src: url("/system/fonts/DroidSerif-Regular.ttf") format("truetype"), local("Droid Sans"), local("Droid Sans Fallback Regular");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: bold; 
font-style: normal; 
src: url("/system/fonts/DroidSerif-Bold.ttf") format("truetype"), local("Droid Sans"), local("Droid Sans Fallback Regular");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: normal; 
font-style: italic; 
src: url("/system/fonts/DroidSerif-Italic.ttf") format("truetype"), local("Droid Sans Fallback Regular");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: bold; 
font-style: italic; 
src: url("/system/fonts/DroidSerif-BoldItalic.ttf") format("truetype"), local("Droid Sans Fallback Regular");
} 
body { 
   margin-right: 8pt;
   font-family: 'Droid Serif', serif;
}
and other stuff:

Code:
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: normal; 
font-style: normal;
src: local("Droid Serif"), local("Droid Sans Fallback");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: bold; 
font-style: normal; 
src: local("Droid Serif"), local("Droid Sans Fallback");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: normal; 
font-style: italic; 
src: local("Droid Serif"), local("Droid Sans Fallback");
} 
@font-face { 
font-family: "Droid Serif", serif, sans-serif; 
font-weight: bold; 
font-style: italic; 
src: local("Droid Serif"), local("Droid Sans Fallback");
} 
body { 
   margin-right: 8pt;
   font-family: 'Droid Serif', serif;
}
Nothing. Even if I could add other fonts, I still can't tell CSS to use them.
 
Old 07-30-2010, 01:54 PM   #8
nprnncbl
Edge User
 
See http://www.entourageedge.com/forums/...d.php?684-root for instructions on rooting.

Copy the files in /system/fonts to your PC.
On your linux pc, you'll need python-fontforge installed.
I'll clean up and post the python script I used to modify the fonts.
 
Old 07-30-2010, 06:29 PM   #9
robot
Edge User
 
Why you use this path url(res:///system/fonts/DroidSansFallback.ttf); ???
You can place font in an folder on your sdcard and than try url(res:///extsdcard/your_fonts/name of font.ttf);
 
Old 07-31-2010, 06:09 AM   #10
jdittric
Edge User
 
Quote:
Originally Posted by robot View Post
Why you use this path url(res:///system/fonts/DroidSansFallback.ttf); ???
Thats the way it is done on the sony reader. The path is the one, the should work and is pointing to the Droid fonts. The Droid fonts support cyrillic letters.

Quote:
Originally Posted by robot View Post
You can place font in an folder on your sdcard and than try url(res:///extsdcard/your_fonts/name of font.ttf);
I tried that as well (placing them on the internal storage /sdcard/), it didn't work.
 
Old 07-31-2010, 09:18 AM   #11
nprnncbl
Edge User
 
I've found that my font hack didn't totally work. The characters work in the browser, but not in the reader, where they just show up as ????. But when I search through the system, I can't find any other font files. Maybe it's an encoding problem?
 
Old 07-31-2010, 05:08 PM   #12
jdittric
Edge User
 
cyrillic fonts are displayed correctly, if you integrate the font files in the epub file. But, why waste so much space on something, that should work out of the box.

btw. the font files that I integrated where the Droid fonts and other. Works like a charm.
 
 


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyrillic fonts for Calibre in Linux albinab Devices 2 02-24-2011 10:44 PM
HELP: Cyrillic RTF into EPUB - unreadable Agnessa Calibre 1 12-30-2010 09:42 AM
PRS-350: Add Cyrillic fonts, lose warranty? Prosto_IA Sony Reader 15 11-25-2010 08:26 AM
Classic Cyrillic fonts for Nook with Caliber birenb Barnes & Noble NOOK 2 07-19-2010 06:20 PM
cyrillic fonts shleepy Bookeen 0 03-17-2009 12:27 AM


All times are GMT -4. The time now is 11:17 PM.


MobileRead.com is a privately owned, operated and funded community.