Quote:
Originally Posted by coneheadZombie
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
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.