I'd like to read Russian literature in its original language. So I downloaded Leo Tolstoy's Anna Karenina and put it in my Nook.
- The original format of the book was a Word document. I had to save it as text file and convert its character set from Windows Cyrillic (CP1251) to UTF-8 using Iconv.
iconv -f CP1251 -t UTF-8 annakarenina.txt > annakarenina-u.txt
- I opened the text file with Sigil, formatted it and saved it as EPUB file.
- Put Unicode fonts in the EPUB file that have a cyrillic range. You can do so with 7-zip. I recommend Book Antiqua, MinionPro or DejaVu Serif.
- antquab.ttf
- antquabi.ttf
- antquai.ttf
- bkant.ttf
- Edit content.opf so that it has references to the fonts:
<item id="font.bold" href="fonts/antquab.ttf" media-type="application/x-font-truetype"/>
<item id="font.bolditalic" href="fonts/antquabi.ttf" media-type="application/x-font-truetype"/>
<item id="font.italic" href="fonts/antquai.ttf" media-type="application/x-font-truetype"/>
<item id="font.regular" href="fonts/bkant.ttf" media-type="application/x-font-truetype"/> - Edit the stylesheet.
@font-face {
font-family: "Book Antiqua";
font-weight: normal;
font-style: normal;
src: url(../fonts/bkant.ttf);
}
@font-face {
font-family: "Book Antiqua";
font-weight: normal;
font-style: italic;
src: url(../fonts/antquai.ttf);
}
@font-face {
font-family: "Book Antiqua";
font-weight: bold;
font-style: normal;
src: url(../fonts/antquab.ttf);
}
@font-face {
font-family: "Book Antiqua";
font-weight: bold;
font-style: italic;
src: url(../fonts/antquabi.ttf);
}
a {
color: inherit;
text-decoration: inherit;
}
em, i {
font-family: "Book Antiqua", serif;
font-weight: normal;
font-style: italic;
}
strong, b, h1, h2, h3, h4, h5 {
font-family: "Book Antiqua", serif;
font-weight: bold;
font-style: normal;
}
p {
text-indent: 2em;
margin-top: 0pt;
margin-bottom: 0pt;
}
body {
font-family: "Book Antiqua", serif;
margin-left: 5pt;
margin-right: 5pt;
text-align: justify;
}
.sgc-1 {text-align: center}
.sgc-2 {text-align: right}
To see how a Russian ebook might look on your Nook or any other reader, download and try my ebook Anna Karerina.
Thank you, I really appreciate your help with the matter of adding fonts:) I thought it might be complicated, but it is really quite simple once you explained it.
ReplyDelete