From 69839e1ae6a468581952696acef873bb329e2f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Fri, 21 Nov 2008 14:53:47 +0000 Subject: [PATCH] * 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/branches/BRANCH_1_6_X@27659 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Language.cpp | 10 ++++++++++ src/Language.h | 2 ++ src/Paragraph.cpp | 8 +++++++- status.16x | 6 ++++-- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Language.cpp b/src/Language.cpp index e4bb4314d8..d45f347f5a 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 278d796a58..b8a265515d 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 12014f6b2f..c2e4432647 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; diff --git a/status.16x b/status.16x index f63a2dacdd..38f7cf0347 100644 --- a/status.16x +++ b/status.16x @@ -69,11 +69,11 @@ What's new - Fix export to latex in the presence of an encoding switch (bug 5489). +- Fix export of straight quotes in Hebrew and Greek context. + * USER INTERFACE -- Fix the -geometry command line option on Windows (bug 5467). - - Fix crash when undoing a math operation while the outline pane was open (bug 5491). @@ -88,6 +88,8 @@ What's new - Fix wrong size of the view source window (bug 4430). +- Fix the -geometry command line option on Windows (bug 5467). + - Fix problem with display of footnote numbers, etc., in child documents. - Fix painting update rules after LFUN_UP or LFUN_DOWN in an inset.