1

I am writing a LaTeX document about Chinese characters decomposition. As such I need many weird and unusual characters.

I have installed several fonts to cover all the CJK set and in my system all characters appear properly.

However, they come from different fonts. Usually from HanMin A, B, and IPAexMincho. So when I compile in LaTeX I get the dreaded errors:

Missing character: There is no 𠚍 in font Hanazono Mincho A Regular/OT:script=ha
Missing character: There is no 𠂭 in font Hanazono Mincho A Regular/OT:script=ha

And changing font just make another character be missing. I played with ctex or xeCJK packages with no avail.

How can I set up (Xe|Lua)LaTeX with a list of fonts to use as fallbacks if a character is missing?

1

If the fonts you need each cover a full Unicode block, you can use ucharclasses with XeLaTeX to set up a font for each block of Chinese. For example, you could set your main Chinese font, then load another for the CJKUnifiedIdeographsExtensionC block.

If you need to patch in an individual character from another font, you could set it active with newunicodechar, e.g.

\newfontfamily\zhextrafont{Babelstone Han}
\newunicodechar{字}{{\zhextrafont 字}}

If you want to auto-detect which characters are missing from the main font, and implement a fallback for a font whose coverage you do not know in advance, you can use \iffontchar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.