I have an automatically generated document (using Doxygen) that has many different Unicode characters for many languages: Hebrew, Japanese, Greek, Arabic and more.
Some parts of text displayed using monospace fonts.
I've tried to use the DejaVu Sans font, which includes most of glyphs but I still miss some Japanese characters and some characters in the monospace fonts.
Is there any way to tell XeLaTeX to make automatic substitutions if the font is missing glyphs?
So it would for example use one font as main and if something is missing would fall back to another font or at least to a non-monospace font that has the correct glyphs?
\XeTeXinterchartokenstate
; you then use\XeTeXinterchartoks 0 1 = { \SwitchToJapaneseFont } \XeTeXinterchartoks 1 0 = { \SwitchToDefaultFont }
. For finer control you will want to use\newXeTeXintercharclass
and\XeTeXcharclass
. Chapter 3 also has a simple example.