Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-07-2012, 03:05 AM   #1
kobowifiguy
Junior Member
kobowifiguy began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2012
Device: Kobo Wifi
KOBO Wifi -- non-English Epubs

http://shoujun.blogspot.com/2012/03/...s-in-epub.html

Okay, I did this with one Chinese book, and it worked. On the other one, I tried for days, and no dice. I think I don't know enough about Epub compilation to figure out what the difference is. If someone can help me get my new Chinese book up and running, I'd be willing to pay for your time. I'm about to throw my beloved Kobo Wifi against a wall if I eject from disk, try again, and see any more ???s -- gah!

Pleeeeease! I'm desperate, lol. There's a Chinese book I want to read for study practice before its corresponding movie goes out of theaters.

Last edited by kobowifiguy; 07-07-2012 at 03:08 AM.
kobowifiguy is offline   Reply With Quote
Old 07-07-2012, 06:44 AM   #2
kumaryu
Zealot
kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.kumaryu ought to be getting tired of karma fortunes by now.
 
Posts: 105
Karma: 222128
Join Date: Jun 2012
Location: Carteya Guadarranque, Andalucia
Device: PRS-300, Kobo: Touch, Glo, Arc, Aura, Glo HD, Nexus7, nergy Pro HD
This is interesting...

So the instructions are for:
1. Embedding a font with Chinese support (Droid Sans)
2. Editing the stylesheet.css to refer to the new embedded font.
3. Editing the metadata to ensure the epub data is displayed in latin characters on the device.

Have you tried completely replacing the stylesheet,css with the one from the epub file that you edited successfully earlier?

If the new epub is not showing up in the library, have you checked the metada content to ensure that there are no non-latin characters (such as spaces or punctuation) in there?
kumaryu is offline   Reply With Quote
Advert
Old 07-07-2012, 10:38 AM   #3
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by kobowifiguy View Post
On the other one, I tried for days, and no dice.
What exactly does not work? Is the book refused by the Kobo reader? Or does the book show, but does not display the Chinese characters? Did you run the book against an epub validation tool?
tshering is offline   Reply With Quote
Old 07-07-2012, 11:12 AM   #4
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
Simplified way of adding a font to show on the Kobo wifi. All of this can be done in Sigil and more easily than unzipping the epub, making changes and
hope they work and then rezipping it.

It's a good idea to save after each step you complete because Sigil does crash every once in awhile.

1) Open epub book in Sigil (install Sigil, if you don't already have it, it will simplify this for you)

2) RIGHT mouse click on Fonts folder in right hand column, Select "Add Existing Files..."

3) Find your font, in this case: DroidSansFallback.ttf, select it, click OPEN.

3b) SAVE...

4) Edit stylesheet.css, my styles are:

p {
font-family: "Droid Sans Fallback";
font-size: 1.00em;
text-align: justify;
}

@font-face {
font-family: "Droid Sans Fallback";
font-weight: normal;
font-style: normal;
src: url(../Fonts/DroidSansFallback.ttf);
}

4b) SAVE

5) Edit Metadata. Go EDIT --> Metadata Editor... change any metadata not in latin to latin characters.

5b) SAVE

6) Check & Edit content.opf to change any metadata still not in latin to latin characters.

6b) SAVE

NOTE: Sigil does NOT reflect embedded fonts in book view or at least not consistantly. So if you check out your work in BV and it doesn't appear to be working, don't dispair, load the book on your Kobo to check it instead. Once your fonts are showing correctly you can then make any more changes to the CSS as needed.

Also make sure there are no over riding classes. ex. <p class="something">
Danger is offline   Reply With Quote
Old 07-08-2012, 12:12 PM   #5
kobowifiguy
Junior Member
kobowifiguy began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2012
Device: Kobo Wifi
Thanks for your help guys. Seems we got a little dream team to nail this thing down.

Quote:
Originally Posted by kumaryu View Post
This is interesting...

So the instructions are for:
1. Embedding a font with Chinese support (Droid Sans)
2. Editing the stylesheet.css to refer to the new embedded font.
3. Editing the metadata to ensure the epub data is displayed in latin characters on the device.

Have you tried completely replacing the stylesheet,css with the one from the epub file that you edited successfully earlier?

If the new epub is not showing up in the library, have you checked the metada content to ensure that there are no non-latin characters (such as spaces or punctuation) in there?
That's the thing, in this new book there's no stylesheet.css. When I open it in Sigil, there's the "Documents" folder, with:
title.xml
about.xml
author.xml
disclaimer.xml
section0001-0027.xml

Then, "Images," with:
cover.jpg

Finally, in the root directory itself (not in any folder):
content.opf
toc.ncx.

Quote:
Originally Posted by tshering View Post
What exactly does not work? Is the book refused by the Kobo reader? Or does the book show, but does not display the Chinese characters? Did you run the book against an epub validation tool?
The book shows up (and works 100% fine in Calibre) on my KOBO Wifi, it's just all non-English characters are the question marks of doom, "???"s (English chars work fine).

As for an "epub validation" tool, I'm not sure what that would accomplish since it already works fine in Calibre, which one I should use and where to find it. If you could give me a brief explanation and point me to directions on using one, I'd be more than happy to do this and report back.

Quote:
Originally Posted by Danger View Post
Simplified way of adding a font to show on the Kobo wifi. All of this can be done in Sigil and more easily than unzipping the epub, making changes and
hope they work and then rezipping it.

It's a good idea to save after each step you complete because Sigil does crash every once in awhile.

1) Open epub book in Sigil (install Sigil, if you don't already have it, it will simplify this for you)

2) RIGHT mouse click on Fonts folder in right hand column, Select "Add Existing Files..."

3) Find your font, in this case: DroidSansFallback.ttf, select it, click OPEN.

3b) SAVE...

4) Edit stylesheet.css, my styles are:

p {
font-family: "Droid Sans Fallback";
font-size: 1.00em;
text-align: justify;
}

@font-face {
font-family: "Droid Sans Fallback";
font-weight: normal;
font-style: normal;
src: url(../Fonts/DroidSansFallback.ttf);
}

4b) SAVE

5) Edit Metadata. Go EDIT --> Metadata Editor... change any metadata not in latin to latin characters.

5b) SAVE

6) Check & Edit content.opf to change any metadata still not in latin to latin characters.

6b) SAVE

NOTE: Sigil does NOT reflect embedded fonts in book view or at least not consistantly. So if you check out your work in BV and it doesn't appear to be working, don't dispair, load the book on your Kobo to check it instead. Once your fonts are showing correctly you can then make any more changes to the CSS as needed.

Also make sure there are no over riding classes. ex. <p class="something">
Thanks Danger, for the Mao book I believe this is exactly what I did, however since it seems the contents itself are different for this one (see above), I'm not sure how to proceed.

Hope this helps everyone, can't wait to hear back, and thanks again for your help!
kobowifiguy is offline   Reply With Quote
Advert
Old 07-08-2012, 03:34 PM   #6
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
No stylesheet.css? Hmmm, possibly inline styles or styles specified in each xml page.

You can create your own stylesheet.css and link to it:

Start in section0001-0027.xml as this will(should) be your main body of text for the book:

Look for:

Code:
<head>
  <title>Book title here</title>
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
The <link... /> won't be there, you need to add that in.

This is also a good time to check for any <style> ... </style> between the <head> tags. Styles specified here will override the stylesheet.css I believe.

Right hand column, under the folder icon Styles, right click and select Add Blank Stylesheet. You will now have a file Style0001.css. Rename to stylesheet.css. Open that new one up and add in your styles.

Last edited by Danger; 07-09-2012 at 07:52 PM. Reason: not -> no
Danger is offline   Reply With Quote
Old 07-09-2012, 01:46 PM   #7
kobowifiguy
Junior Member
kobowifiguy began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2012
Device: Kobo Wifi
Quote:
Originally Posted by Danger View Post
Not stylesheet.css? Hmmm, possibly inline styles or styles specified in each xml page.

You can create your own styleshee.css and link to it:

Start in section0001-0027.xml as this will(should) be your main body of text for the book:

Look for:

Code:
<head>
  <title>Book title here</title>
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
The <link... /> won't be there, you need to add that in.

This is also a good time to check for any <style> ... </style> between the <head> tags. Styles specified here will override the stylesheet.css I believe.

Right hand column, under the folder icon Styles, right click and select Add Blank Stylesheet. You will now have a file Style0001.css. Rename to stylesheet.css. Open that new one up and add in your styles.
It worked!!!!

This is me rah now ->

Danger, you're the man! I never would have gotten it to work without your help. And just like you said, there were <style> tags in between the <head> tags, which, had you not anticipated it, would have definitely been my next question, lol...I gave you the most Karma I could.

Oh, btw... for anyone who might come across this, some header text was still "???"s; I edited the stylesheet.css and added the following to make it display precisely as desired:
h1{text-align:right; margin-right:2em; page-break-before: always;
font-family: "Droid Sans Fallback";
font-size:1.6em; font-weight:bold;}

h2{
display: block;
font-family: "Droid Sans Fallback";
font-size: 1.2em;
font-weight: bold;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
page-break-before: always;
}


Cheers!

Excuse me, I'm gonna go read Chinese now on my Kobo Wifi... like a boss.


Last edited by kobowifiguy; 07-09-2012 at 02:25 PM.
kobowifiguy is offline   Reply With Quote
Old 07-09-2012, 07:53 PM   #8
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
Your welcome, glad it is working for you now
Danger is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd; Kobo-purchased book reads fine on Desktop, WiFi and Sony -but not on Kobo Touch. beautifulsoup Kobo Reader 4 07-17-2012 09:29 AM
KOBO Wifi non-English WORKS, But New Problem -- Help Please? kobowifiguy ePub 6 07-07-2012 05:22 AM
Touch Problem with all epubs, my epubs, or my kobo? (line clipping) plague006 Kobo Reader 14 12-02-2011 11:32 PM
Sync epubs between Kobo app and Kobo wifi? emilikins Kobo Reader 1 11-17-2011 04:12 PM
Kobo Desktop App v1.7 onboard Kobo WiFi ZombWii Kobo Reader 6 10-20-2010 12:24 PM


All times are GMT -4. The time now is 12:55 PM.


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