[XeTeX] missing characters and msgs

Jonathan Kew jfkthame at googlemail.com
Sun Aug 23 00:04:57 CEST 2009


On Sat, Aug 22, 2009 at 4:27 PM, Mike Maxwell<maxwell at umiacs.umd.edu> wrote:
> I'm getting a msg from xetex about missing characters in a font; I'm unclear
> whether I should worry.  The output looks OK, I think, but I still worrry
> :-)
>
> The warning is:
> -----------
> Missing character: There is no X in font
> [/groups/tools/fonts/NafeesNastaleeq
> _v1_02.ttf]/ICU:script=arab,!
> -----------
> Some comments:
> 1) The actual missing character is not X, but U+200C = ZWNJ.

I wonder if you are viewing the terminal output with a font where ZWNJ
is not present, and the "missing glyph" looks like a (boxed?) X.

> 2) At the end of the xelatex run, I get the msg
>      LaTeX Font Info:    Some font shapes were not available,
>      defaults substituted.
>   I'm guessing this means that xelatex substituted a ZWNJ from
>   some other font, in which case maybe the original error msg
>   could be improved to say that (like "There is no X in font
>   uglification, using font glitzy for this character.")

No, xetex does not do font substitution. So if your text contains
ZWNJ, but this is not supported by the font you're using, you'll get
that font's "missing glyph", which may be a box or blob of some kind,
or may (if you're lucky, in this case) be an invisible glyph.

If it happens that the font you're using renders missing glyphs as
zero-width, invisible glyphs (rather than as some visible artifact),
then in the case of ZWNJ you'll actually be getting the result you
wanted -- but more by chance than anything else!

You could consider making ZWNJ an active character and defining it as
a zero-width kern; for most purposes, this will give the effect of a
ZWNJ without relying on the font to support it.

  \catcode"200C = \active
  \def^^^^200c{\kern0pt\relax}

(Might need some extra care if text containing these is getting
written to various auxiliary files or otherwise given special
handling.)

JK


More information about the XeTeX mailing list