Saturday, March 13, 2010

Creating Korean eBooks in EPUB format

As far as I know, there aren't a lot of Korean ebooks in EPUB format. However, if you have a Korean literature of any kind, you can create an EPUB file for viewing on a digital reader. Assuming that you have a Korean text file in KSC5601 or UHC character set, you should convert your text file into Unicode encoding. You can do so with iconv.

iconv -f UHC -t UTF-8 oldtext.txt > newtext.txt

Open the new Unicode-encoded text in Sigil, edit it and save it as an EPUB file. Now you should add Korean fonts into your EPUB file. I recommend the following fonts.

  • H2GTRM.TTF
  • H2GTRB.TTF

Then, edit content.opf in your EPUB file so that the manifest section contains the following:

<item id="h2gtrm.ttf" href="fonts/h2gtrm.ttf" media-type="application/x-font-truetype"/> <item id="h2gtrb.ttf" href="fonts/h2gtrb.ttf" media-type="application/x-font-truetype"/>

Start Sigil again and open your EPUB file. Select the dual editing mode and insert the following CSS definitions into the HTML header.

  @font-face {
  font-family: HYGothic-Medium;
  font-weight: normal;
  font-style: normal;
  src: url(../fonts/h2gtrm.ttf);
  }
  @font-face {
  font-family: HYGothic-Bold;
  font-weight: bold;
  font-style: normal;
  src: url(../fonts/h2gtrb.ttf);
  }
  a {
    color: inherit;
    text-decoration: inherit;
    }
  em, i {
  font-family: HYGothic-Medium, sans-serif;
  font-weight: normal;
  font-style: italic;
  text-decoration: underline;
  }
  strong, b, h1, h2, h3, h4, h5, h6 {
  font-family: HYGothic-Bold, sans-serif;
  font-weight: bold;
  font-style: normal;
  }
  body {
  font-family: HYGothic-Medium, sans-serif;
  margin-left: 5pt;
  margin-right: 5pt;
  text-align: justify;
  }

Test your ebook with Adobe Digital Editions. It should display Korean correctly.

About This Blog

KBlog logo This blog seeks to provide useful information to people, based on the author's knowledge and experience. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Follow by Email

Total Pageviews