View Single Post
Old 02-11-2019, 07:41 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by coneheadZombie View Post
This book contains of Japanese text( other characters excluding these).

Do you know which font might me suitable for embedding ?
Hmmm, I'm not too familiar with Asian fonts. I only work with English + Latin-based languages.

Maybe Source Han Serif + Source Han Sans:

https://en.wikipedia.org/wiki/Source_Han_Serif

or the Noto fonts:

https://en.wikipedia.org/wiki/Noto_fonts

Those were designed by Adobe+Google.

When embedding fonts, you have to make sure the License is an Open License and allows embedding.

Quote:
Originally Posted by coneheadZombie View Post
also how do i fix a particular for <p> in all devices ? do i have to add it in the css for <p> ?
You can see the MobileRead Wiki for an example:

https://wiki.mobileread.com/wiki/EPu...Font_embedding

What you have to do is add the OTF files into the EPUB, then add a few lines of CSS:

Code:
@font-face { 
	font-family: "Source Han Sans";
	font-weight: normal;
	font-style: normal;
	src: url(../Fonts/SourceHanSans-Regular.otf);
}
You have to adjust that for bold + italic + bold/italic (and whatever other types you are embedding).

Then you have to add a little line to your <p> in the CSS:

Code:
p { 
	font-family: "Source Han Sans", serif;
	[...]
}
What this says is for every paragraph "use the 'Source Han Sans' font" + "if that doesn't exist, use the serif font".

If the font then displays correctly in Sigil/Calibre, then it's recommended to Subset the font in order to make the font files much smaller (it will only keep the characters your book actually uses).

In Calibre's Editor, you can Tools > Subset embedded fonts.

Or in Sigil, there's Toxaris's "ePUB Optimizer" plugin.

Or various other font subsetting tools out there.

Last edited by Tex2002ans; 02-11-2019 at 11:14 PM.
Tex2002ans is offline   Reply With Quote