// ArabTeX, though, cannot handle this special behavior, it seems.
bool arabtex = basefont.language()->lang() == "arabic_arabtex"
|| running_font.language()->lang() == "arabic_arabtex";
- if (open_font && inset->noFontChange()) {
+ if (open_font && !inset->inheritFont()) {
bool closeLanguage = arabtex
|| basefont.isRightToLeft() == running_font.isRightToLeft();
unsigned int count = running_font.latexWriteEndChanges(os,
char_type const c = text_[i];
if (style.pass_thru || runparams.pass_thru) {
- if (c != '\0')
- // FIXME UNICODE: This can fail if c cannot
- // be encoded in the current encoding.
+ if (c != '\0') {
+ Encoding const * const enc = runparams.encoding;
+ if (enc && enc->latexChar(c, true).empty())
+ throw EncodingException(c);
os.put(c);
+ }
return;
}