From: Juergen Spitzmueller Date: Wed, 9 Aug 2017 15:25:02 +0000 (+0200) Subject: Fix straight quote character in non-T1 encoding X-Git-Tag: 2.3.0beta1~31 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=094341fa5a9597775a7adae723223e7580ab6b3a;p=features.git Fix straight quote character in non-T1 encoding Fixes: #10584 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 7c3300d601..309c20caff 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1247,8 +1247,8 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, } break; case '\"': - os << "\\char34" << termcmd; - column += 9; + os << "\\textquotedbl" << termcmd; + column += 14; break; case '$': case '&': @@ -1499,8 +1499,16 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const } // then the contents + BufferParams const bp = features.buffer().masterParams(); for (pos_type i = 0; i < int(text_.size()) ; ++i) { - BufferEncodings::validate(text_[i], features); + char_type c = text_[i]; + if (c == 0x0022) { + if (features.runparams().isFullUnicode() && bp.useNonTeXFonts) + features.require("textquotedblp"); + else if (bp.main_font_encoding() != "T1") + features.require("textquotedbl"); + } + BufferEncodings::validate(c, features); } }