mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Do not error on missing ZWNJ (ligature break) characters.
Since TeXLive 2016, "fontspec" maps the ligature break command \textcompwordmark to the ZWNJ character (U+200C). This character is missing in many fonts (including the default: Latin Modern) which leads to "Missing character" warnings in the XeTeX/LuaTeX log file if a document using non-TeX fonts contains a ligature break. LyX reports missing characters as error since fixing #9610. In case of "invisible" characters, there is no data loss, in case of the ZWNJ the functionality is kept: ligatures are prevented also if the ZWNJ is missing in a font. Therefore, a missing ZWNJ is now treated similar to missing characters in "nullfont" (see [63f41711/lyxgit], bug #10394) and does not trigger an error. Fixes: #10727
This commit is contained in:
parent
3c7b75c5bc
commit
a40868510d
@ -936,11 +936,18 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
// Warning about missing glyph in selected font
|
||||
// may be dataloss (bug 9610)
|
||||
// but can be ignored for 'nullfont' (bug 10394).
|
||||
retval |= LATEX_ERROR;
|
||||
terr.insertError(0,
|
||||
from_local8bit("Missing glyphs!"),
|
||||
from_local8bit(token),
|
||||
child_name);
|
||||
// as well as for ZERO WIDTH NON-JOINER (0x200C) which is
|
||||
// missing in many fonts and output for ligature break (bug 10727).
|
||||
// Since this error only occurs with utf8 output, we can safely assume
|
||||
// that the log file is utf8-encoded
|
||||
docstring const utoken = from_utf8(token);
|
||||
if (!contains(utoken, 0x200C)) {
|
||||
retval |= LATEX_ERROR;
|
||||
terr.insertError(0,
|
||||
from_ascii("Missing glyphs!"),
|
||||
utoken,
|
||||
child_name);
|
||||
}
|
||||
} else if (!wait_for_error.empty()) {
|
||||
// We collect information until we know we have an error.
|
||||
wait_for_error += token + '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user