Can I get TeX (and particularly LuaTeX) issue an error when a font does not contain a glyph of the required type (roman, italic, etc.) for a character in the document being processed? A particular case of interest are fonts that lack glyphs for cyrillic letters (e.g.cmr10). Another case of interest are fonts (e.g. FreeSerif) that have their roman, italicized, bold and bold italicized types in separate files (and each type has to be loaded separately before it can be used).
1 Answers
there is a report in the log file, of the form:
Missing character: There is no <char> in font <fontname>!
it isn't reported as an error, but it's easy enough to search for that message.
the report will be given only for glyphs/characters that are actually used in the input file.
pdflatex and xelatex will report missing glyphs; the mechanism is implemented deep in the innards of the *tex program, and it would probably not be a simple matter to convert this warning to a full error. however, it is not difficult to create a script to scan the log file for the message and produce a report.
i'm not a lualatex user, and i overlooked the fact that you are particularly interested in luatex. i just checked, and it seems that lualatex does not report missing glyphs. i would consider this a design flaw, and suggest that you submit a request for this feature to be provided. since luatex is following a somewhat different trajectory from the more "conventional" *tex implementations, it would be reasonable to suggest that the feature be implemented with a switch to specify whether the report should be a warning or an error. (not everyone wants the compilation to come to a screeching halt that would result from an error being reported.) the feature be added
- 88,848
-
What you are saying seems to be true for TeX but not for LuaTeX (or am I running too old a version---beta-0.70.2-2012062812).
Anyway, my question is if it possible to get an error, not just a report?
– SJU May 26 '14 at 18:58 -
@AngelTsankov -- sorry, i overlooked the fact that you are most interested in lualatex. i've tested this, and updated my answer. – barbara beeton May 26 '14 at 20:33
logfile? – Sigur May 26 '14 at 13:53.logfile, instead of being output in the screen. You can search for the textFont Warningin the.logfor non-available families/shapes/series or the textMissing characterfor missing glyphs in a font. – JLDiaz May 26 '14 at 17:14