From 925c17c058fe6c82c60020d08a58366255061f1b Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 26 Mar 2007 08:24:38 +0000 Subject: [PATCH] Get rid of LyXRC::font_norm_type, since it is no longer needed for arabic support. LyXRC::font_norm stays for now, since it is still used for the kbmap stuff. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17566 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/lyxfunc.C | 1 - src/lyxrc.C | 22 ---------------------- src/lyxrc.h | 23 ----------------------- src/paragraph.C | 6 +----- src/rowpainter.C | 4 +--- src/text.C | 4 +--- 6 files changed, 3 insertions(+), 57 deletions(-) diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 71192b1b77..90d8c847e9 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1475,7 +1475,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd) case LFUN_SCREEN_FONT_UPDATE: BOOST_ASSERT(lyx_view_); // handle the screen font changes. - lyxrc.set_font_norm_type(); theFontLoader().update(); /// FIXME: only the current view will be updated. the Gui /// class is able to furnish the list of views. diff --git a/src/lyxrc.C b/src/lyxrc.C index 285731bf90..58183c4127 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -238,7 +238,6 @@ void LyXRC::setDefaults() { sans_font_name = ""; typewriter_font_name = ""; font_norm = "iso8859-1"; - font_norm_type = ISO_8859_1; autosave = 300; auto_region_delete = true; auto_reset_options = false; @@ -800,7 +799,6 @@ int LyXRC::read(LyXLex & lexrc) case RC_SCREEN_FONT_ENCODING: if (lexrc.next()) { font_norm = lexrc.getString(); - set_font_norm_type(); } break; @@ -2089,26 +2087,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const os.flush(); } -void LyXRC::set_font_norm_type() -{ - if (font_norm == "iso10646-1") - font_norm_type = ISO_10646_1; - else if (font_norm == "iso8859-1") - font_norm_type = ISO_8859_1; - else if (font_norm == "iso8859-3") - font_norm_type = ISO_8859_3; - else if (font_norm == "iso8859-4") - font_norm_type = ISO_8859_4; - else if (font_norm == "iso8859-6.8x") - font_norm_type = ISO_8859_6_8; - else if (font_norm == "iso8859-9") - font_norm_type = ISO_8859_9; - else if (font_norm == "iso8859-15") - font_norm_type = ISO_8859_15; - else - font_norm_type = OTHER_ENCODING; -} - #if 0 string const LyXRC::getDescription(LyXRCTags tag) diff --git a/src/lyxrc.h b/src/lyxrc.h index eef4d55296..23ca9e0750 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -275,29 +275,6 @@ public: /// std::string font_norm; /// - enum FontEncoding { - /// - ISO_10646_1, - /// - ISO_8859_1, - /// - ISO_8859_3, - /// - ISO_8859_4, - /// - ISO_8859_6_8, - /// - ISO_8859_9, - /// - ISO_8859_15, - /// - OTHER_ENCODING - }; - /// - FontEncoding font_norm_type; - /// - void set_font_norm_type(); - /// unsigned int autosave; /// std::string plaintext_roff_command; diff --git a/src/paragraph.C b/src/paragraph.C index f95d48d1a2..c5258e0981 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -1557,11 +1557,7 @@ bool Paragraph::allowEmpty() const char_type Paragraph::transformChar(char_type c, pos_type pos) const { if (!Encodings::is_arabic(c)) - if (lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 && isDigit(c)) - // FIXME UNICODE What does this do? - return c + (0xb0 - '0'); - else - return c; + return c; value_type const prev_char = pos > 0 ? getChar(pos - 1) : ' '; value_type next_char = ' '; diff --git a/src/rowpainter.C b/src/rowpainter.C index 3ef9a9a59f..9e267b798d 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -416,9 +416,7 @@ void RowPainter::paintFromPos(pos_type & vpos) // special case languages std::string const & lang = orig_font.language()->lang(); bool const hebrew = lang == "hebrew"; - bool const arabic = lang == "arabic" && - (lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 || - lyxrc.font_norm_type == LyXRC::ISO_10646_1); + bool const arabic = lang == "arabic"; // draw as many chars as we can if ((!hebrew && !arabic) diff --git a/src/text.C b/src/text.C index fa7d4a620e..50dcbfe4ee 100644 --- a/src/text.C +++ b/src/text.C @@ -367,9 +367,7 @@ int LyXText::singleWidth(Paragraph const & par, if (isPrintable(c)) { Language const * language = font.language(); if (language->rightToLeft()) { - if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 || - lyxrc.font_norm_type == LyXRC::ISO_10646_1) - && language->lang() == "arabic") { + if (language->lang() == "arabic") { if (Encodings::isComposeChar_arabic(c)) return 0; c = par.transformChar(c, pos); -- 2.39.5