]> git.lyx.org Git - lyx.git/commitdiff
Get rid of LyXRC::font_norm_type, since it is no longer needed for arabic
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 26 Mar 2007 08:24:38 +0000 (08:24 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 26 Mar 2007 08:24:38 +0000 (08:24 +0000)
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
src/lyxrc.C
src/lyxrc.h
src/paragraph.C
src/rowpainter.C
src/text.C

index 71192b1b779a762b2717bad7262f1fe88db1dfa8..90d8c847e944de7e7dde1eecaf0eb67bed25c8a6 100644 (file)
@@ -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.
index 285731bf90d26dc056fed990c6e2bc9a7910301c..58183c412758271cdcae1fae9edd5458bdbc156f 100644 (file)
@@ -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)
index eef4d55296eb660a7c13fb8db1a161981dc2f346..23ca9e07501ed77f3c992d79d44db7c7b9af314e 100644 (file)
@@ -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;
index f95d48d1a22f4cba54b6ab67da3aac1822b2603d..c5258e098111fda2c0fbfbb6470080fc2a3df101 100644 (file)
@@ -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 = ' ';
index 3ef9a9a59f47de08694a11302474b21cee721488..9e267b798d149fef9cb179d3896f7d014bad4135 100644 (file)
@@ -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)
index fa7d4a620e791457ca55a75154a4125e6b105fc6..50dcbfe4ee171454fd790cdb20f75539ee7d2172 100644 (file)
@@ -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);