From: Jürgen Spitzmüller Date: Fri, 21 Nov 2008 14:58:26 +0000 (+0000) Subject: * src/Language{.cpp,h}: X-Git-Tag: 2.0.0~7651 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6b64fc8ca6c660684b048e4b04665b7e472ba1c0;p=features.git * src/Language{.cpp,h}: - new member internalFontEncoding() that indicates if a language switches the font encoding internally. * src/Paragraph.cpp (latexSpecialChar): - don't call latexSpecialT1 if the internal font encoding isn't T1. This fixes the output of straight quotation marks in Hebrew and Greek. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27660 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Language.cpp b/src/Language.cpp index 6035aef3a3..2093bc373c 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -57,6 +57,16 @@ bool Language::read(Lexer & lex) return true; } +bool Language::internalFontEncoding() const +{ + // FIXME: list incomplete + // FIXME: instead of hardcoding, this + // should go to the languages file + return lang_ == "hebrew" + || lang_ == "greek" + || lang_ == "polutonikogreek"; +} + void Languages::read(FileName const & filename) { diff --git a/src/Language.h b/src/Language.h index bee8e13bcd..575dd33392 100644 --- a/src/Language.h +++ b/src/Language.h @@ -48,6 +48,8 @@ public: /// std::string const & latex_options() const { return latex_options_; } /// + bool internalFontEncoding() const; + /// bool read(Lexer & lex); private: /// diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 10df0085e1..3201105b17 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -864,9 +864,15 @@ void Paragraph::Private::latexSpecialChar( return; } - if (lyxrc.fontenc == "T1" && latexSpecialT1(c, os, i, column)) + // If T1 font encoding is used, use the special + // characters it provides. + // NOTE: some languages reset the font encoding + // internally + if (!running_font.language()->internalFontEncoding() + && lyxrc.fontenc == "T1" && latexSpecialT1(c, os, i, column)) return; + // \tt font needs special treatment if (running_font.fontInfo().family() == TYPEWRITER_FAMILY && latexSpecialTypewriter(c, os, i, column)) return;