I've been asked to integrate Chinese characters into a mainly-English LaTeX template.

Although I found different options, such as ctex, I stumbled with its integration (mainly because the documentation is only available in Chinese). As a result, the best workable solution I found was to set the font to one with an extensive enough character set (along the lines of \setmainfont{NotoSansCJKjp}).

Now there's a final hurdle: due to corporate restrictions, I must use a "normal" font for most of the document, so I have to switch back and forth among fonts. I can define a command to switch the font and ask the user to use it before every text in Chinese, but this feels error prone and cumbersome.

As a result, I'd like to define a "secondary font": if the character exists in the "normal" font, print it. Else, fall back to the secondary font. I've seen questions like this, but an individual mapping of each Chinese character is unworkable, and I'm not sure it would even solve the problem.

So, the question is: is this possible, say, with fontspec? Can I define a fallback font for a large subset of characters?

  • 1
    are you using lualatex or xelatex? – Ulrike Fischer Aug 20 '19 at 9:17
  • Lualatex </EOM> – guest_user Aug 20 '19 at 9:27

Your Answer

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

Browse other questions tagged or ask your own question.