![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: May 2021
Device: Kobo Libre
|
Japanese characters not showing up on some devices
Hi everyone, I'm a newbie to both eBook formatting and Calibre, but willing to learn!
I have an ePub novel that was originally typeset in Reedsy. There are several instances of Japanese kanji characters in the book that show up fine in Calibre and in Kindle Previewer. However, when I send it over to my Kobo Libre, the Japanese text is deleted out. (Doesn't display as a blank or as weird characters; just vanishes entirely.) I know my Kobo has the ability to display kanji, because I just read a book that had it, and it was definitely text and not an image of the characters dropped in. Something in this book is not set up right, I'm guessing, but I'm not positive what. (I also tried generating ePubs from LibreOffice and Scrivener and they won't display the kanji either, so it's not a problem unique to the Reedsy-typeset file.) I was trying to follow directions to embed the fonts after seeing older posts in this forum, thinking that might be a fix, but I've never worked in-depth with Calibre yet and I don't seem to be doing it right: Spoiler:
Can someone nudge me in the right direction? Thanks! Last edited by WT Sharpe; 05-25-2021 at 09:01 PM. Reason: Image too large. Wrapped it in spoiler tags. |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 12122120
Join Date: Jul 2017
Device: Boox Nova 2
|
I think you need to embed a font that has CJK character support like Noto. The fonts shown embedded there don't cover Japanese or Chinese characters.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
If you hope to sell this book, be aware that embedding fonts can lead to trouble on Amazon's KDP. Also note that Calibre, while a wonderful library management tool, is not the best way to format a book for sale. For that, Sigil is the go-to software.
|
![]() |
![]() |
![]() |
#4 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() Quote:
2020: "Should Chinese Fonts be Embedded in Ebooks?" I was working on a few journal articles that had a handful of Chinese/Japanese characters. The topic goes into a lot of technical discussion though, so I'll try to create a more easy tutorial here. ![]() * * * This is what you'll do: 1. Use Proper HTML Language in Your Document Add this code around all your Japanese text: Code:
<span class="japanese" lang="ja" xml:lang="ja">返</span>
2. Find Font That Includes Characters You Need A big list of CJK fonts can be found on Wikipedia: https://en.wikipedia.org/wiki/List_of_CJK_fonts For example, the "Source Han" or "Noto" fonts have a license that allows you to embed them in ebooks for free. 3. Download the OTF or TTF Once you've chosen your font, download the OTF or TTF versions. (This is the format needed for EPUBs.) For example, here is the latest page for "Source Han Sans": https://github.com/adobe-fonts/sourc...ses/tag/2.004R (As of today, it's v2.004. Yes, fonts have version numbers + they get updated/fixed!) Every font will be slightly different in organization/naming conventions... But in this case, you want to download:
Unzip the file, and you'll see multiple folders. What you want is buried in OTF: - SourceHanSans -- OTF --- Japanese ---- SourceHanSans-Regular.otf You can install that font to your computer and/or you can use that file to shove into your ebook. 4. Add the CSS Now, you want to go back into your EPUB. This time, we'll adjust the CSS. In your CSS file, add this: Code:
span.japanese { font-family: "Source Han Sans", sans-serif; } This says to use the font ONLY for those specific pieces. ![]() And in plain English, the code says: "For every <span> that has a class named 'japanese': Use the font Source Han Sans. If you can't find that, use the device's default sans-serif font." 5. Insert Font Into Your EPUB 5.1. If you're using Calibre:
or you can:
5.2. If you're using Sigil:
5.3. Or you can manually put this at the top of your CSS: Code:
@font-face { font-family: "Source Han Sans"; font-weight: normal; font-style: normal; src: url(“../Fonts/SourceHanSans-Regular.otf”); } "I have a new font here! The font's name is Source Han Sans. It is not bold and not italics. This is the location of the font file." (Optional) 6. Subset your Fonts If Calibre: Tools > Subset Embedded Fonts If Sigil: Use Doitsu's "SubsetFonts" plugin. This will cut down the filesize. Asian font files are huge, because there are thousands and thousands of characters. If you're only using a handful (like in my journal articles, there were maybe ~20 characters total), you can shave the font from many MBs down to a few hundred KBs. In plain English: What does subsetting do exactly? Subsetting looks through your specific book + font, then deletes every letter you're not using. Imagine you only used the fancy font on your book's title page: "I CUP". You can remove all those thousands and thousands of characters, only leaving 4 within the subsetted font: I + C + U + P! ![]() Quote:
Calibre's Editor does some things better than Sigil, like External Link check + Insert Special Character. And Sigil does some things better than Calibre, like easier TOC editing + easier-to-read Reports. Last edited by Tex2002ans; 05-23-2021 at 08:12 AM. |
|||
![]() |
![]() |
![]() |
#5 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,698
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Excellent tutorial.
And then even when done properly it won't work on many older ereaders, because the companies took lazy Western-centric view. The actual OSes used had Cyrillic, Arabic, Chinese, Japanese, Thai, Hindi, Hebrew etc over a decade before dedicated ebook readers were developed. Amazon Kindle was one of the most backward. Both Sigil and Calibre can be better for ebooks than expensive Indesign as it's fudged for ebooks, it was developed for PDFs and production of papers, magazines and technical books. Even for PDF novels a free Word processor can be better than InDesign. Last edited by Quoth; 05-23-2021 at 08:20 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
![]() ![]() Quote:
Check out these two fantastic videos by Computerphile (especially the first one!): "Internationalis(z)ing Code" "Characters, Symbols and the Unicode Miracle" And many other details were discussed in that "Should Chinese be Embedded" thread above. If you're interested in more, check out the Harfbuzz + LibreOffice talks I linked to in Post #8. Harbuzz is the renderer that figures out how to actually draw the characters (it's now the basis of many programs/browsers). And the LibreOffice talks were some of the Asian users discussing common bugs/problems that crop up in programs like Word/LibreOffice. Plus needing to keep in mind special cases, like how they input characters using IME. Last edited by Tex2002ans; 05-23-2021 at 08:44 AM. |
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: May 2021
Device: Kobo Libre
|
Thank you so much! Luckily, the Kindle version displays properly and the typesetting looks great right out of the box, it's the other readers I'm trying to tackle - but I'll definitely have a closer look at Sigil once I get used to Calibre and CSS adjustments.
I really appreciate the tutorial - will get started on how to apply it tomorrow! |
![]() |
![]() |
![]() |
#8 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Kindle Previewer 3 only shows you the latest devices/formats... But you still have to keep in mind fallback code for very old Kindle devices that only read the original MOBI format (like the Kindle DX). Sadly, Kindle Previewer 3 doesn't show these ol' devices in the dropdown anymore. You'd need to run an old version of Kindle Previewer 2 (or have a very old device on hand). * * * Can you show more actual examples of the Japanese usage in this book? In the case of my journal articles, they all included full English transliterations right next to the original Chinese/Japanese words: Code:
Liu E, also known as Liu Tieyun <span class="japanese" lang="ja" xml:lang="ja">劉鐵雲</span>, was born in 1857 at Liuhe <span class="japanese" lang="ja" xml:lang="ja">六合</span> county in what is today Nanjing <span class="japanese" lang="ja" xml:lang="ja">南京</span>. Code:
@media amzn-mobi { .chinese { display: none; } .japanese { display: none; } } - If the format is Amazon's old MOBI format. - And the class is "chinese" or "japanese" - Hide it. Instead of a reader seeing "missing boxes"... it'll just be disappeared, and all you'd see is the English text: Quote:
Quote:
As you're following Step 1, adding the proper HTML lang markup, you can use Calibre's/Sigil's fantastic Spellcheck Lists. In Calibre: Tools > Check Spelling. In Sigil: Tools > Spellcheck > Spellcheck. You can then sort by the "Word" or "Language" column. Here's what it looks like in Sigil 1.5.1: This lets you easily spot words you haven't marked yet or accidentally marked wrongly. Like you might see a Japanese word that says Language: "English". You can then double-click on the word to jump to its location in the ebook, then add that Step 1 <span> code around it. ![]() Last edited by Tex2002ans; 05-24-2021 at 07:28 AM. |
|||
![]() |
![]() |
![]() |
#9 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
There really isn't a choice, at this point in time. You cannot upload a book at Amazon that says "Hey, I'm kF8/KFX only, don't sell me to people with Kindle Keyboards," so...you have to take the longer view. (n.b.: well, you could upload a book that says KF8/KFX only, by using fixed-layout but we don't do that for all the obvious reasons.) Hitch |
|
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,814
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Looking at the OP's message, he references a Kobo Libre. The Libre has a couple of CJK fonts available but you will need to select one of them which will set also set that font as the default for the next book. You also need to avoid using font-family references in the CSS which can block the ability to select either Tsukushi Mincho or UD Kakugo as the display font when displaying Japanese characters when creating an epub that will be displayed with the RMSDK renderer. Creating a kepub will use Kobo's epub3 renderer which will search for a glyph that is not defined in the current font. At time the results of doing this can be a bit strange.
Last edited by DNSB; 05-24-2021 at 01:31 PM. |
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,125
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Calibre works perfectly well to format an eBook. I do use it. No slight against Sigil. I just want to correct your incorrect statement.
|
![]() |
![]() |
![]() |
#12 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,125
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#13 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Have any insights into mass generating the images? And/or resizing them correctly to the text reliably? I think I have a few workflow ideas with ImageMagick (similar to my formulas generation), but that's a whole other thing. ![]() And I personally haven't messed with inline images too much since way back during that SVG/apple thread. * * * Side Note: For book club, I've recently been reading Jordan Peterson's latest book: "Beyond Order: 12 More Rules for Life", published by Penguin Random House. The EPUB had two Hebrew words in there as inline images: Quote:
Code:
img.h1em-HEB { height: 1em; vertical-align: bottom; } And I'm glad to see they used the proper alt tags! ![]() |
||
![]() |
![]() |
![]() |
#14 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,698
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
I test any new styles on a DXG and KK3 (using Dual Mobi and also Publisher option and default on the KK3). |
|
![]() |
![]() |
![]() |
#15 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,125
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clara HD Japanese and Chinese characters | moonangelica | Kobo Reader | 9 | 03-03-2020 11:41 PM |
Japanese characters not showing properly | vaanen | PocketBook | 4 | 03-22-2018 05:34 PM |
E-reader for Japanese characters? | Stitchawl | Which one should I buy? | 6 | 05-27-2011 03:16 AM |
PRS-650 Japanese characters? | Alfablue | Sony Reader | 3 | 10-01-2010 11:05 PM |
Japanese characters do not display :-( | hirooekimae | Sony Reader | 10 | 04-07-2009 02:18 PM |