]> git.lyx.org Git - features.git/commitdiff
support for wasy symbols
authorAndré Pönitz <poenitz@gmx.net>
Tue, 9 Jul 2002 13:38:27 +0000 (13:38 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 9 Jul 2002 13:38:27 +0000 (13:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4566 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/LaTeXFeatures.C
src/frontends/xforms/xfont_loader.C
src/lyxfont.C
src/lyxfont.h
src/mathed/math_braceinset.C
src/mathed/math_braceinset.h
src/mathed/math_cursor.C
src/mathed/math_hullinset.C
src/mathed/math_support.C

index 6659c48b69d524ed6fb9ff26cf0ab4e7c4c95e1b..0b2d7deb8237afe44095b5a61f6056e8e300468b 100644 (file)
@@ -1,4 +1,8 @@
 
+2002-07-09  André Pönitz <poenitz@gmx.net>
+
+       * lyxfont.[Ch]: support for wasy symbols
+
 2002-07-08  André Pönitz <poenitz@gmx.net>
 
        * BufferView_pimpl.C: apply John's patch for #93. 
index 2010eca80c4a3d2d0f84a1234f51327b30411570..1648699972e604698eb7d0d38095d02a781ce94c 100644 (file)
@@ -141,7 +141,8 @@ char const * simplefeatures[] = {
        "floatflt",
        "varioref",
        "prettyref",
-       "float"
+       "float",
+       "wasy"
 };
 
 const int nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
@@ -154,21 +155,20 @@ string const LaTeXFeatures::getPackages() const
        LyXTextClass const & tclass = textclasslist[params.textclass];
 
 
-       /**
-        *  These are all the 'simple' includes.  i.e
-        *  packages which we just \usepackage{package}
-        **/
-       for (int i = 0 ; i < nb_simplefeatures ; ++i) {
+       //
+       //  These are all the 'simple' includes.  i.e
+       //  packages which we just \usepackage{package}
+       //
+       for (int i = 0; i < nb_simplefeatures; ++i) {
                if (isRequired(simplefeatures[i]))
                        packages << "\\usepackage{"
-                                << simplefeatures[i]
-                                << "}\n";
+                                << simplefeatures[i] << "}\n";
        }
 
-       /**
-        * The rest of these packages are somewhat more complicated
-        * than those above.
-        **/
+       //
+       // The rest of these packages are somewhat more complicated
+       // than those above.
+       //
 
        if (isRequired("amsmath")
            && ! tclass.provides(LyXTextClass::amsmath)) {
index 5008192fe3a5c6dc750db2cc6fcbf604225e92e6..44426af45a3546f2877e635d3ad88e4547bab21d 100644 (file)
@@ -147,6 +147,11 @@ void xfont_loader::getFontinfo(LyXFont::FONT_FAMILY family,
                                new FontInfo("-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
+               case LyXFont::WASY_FAMILY:
+                       fontinfo[family][series][shape] =
+                               new FontInfo("-*-wasy10-medium-*-*-*-*-*-*-*-*-*-*-*");
+                       return;
+
                default:
                        break;
        }
index c3067a84005090f87da6301df3b23f6db384be83..8cd660eed0561da8b487b1240abdbf760913f4e4 100644 (file)
@@ -41,7 +41,7 @@ namespace {
 
 char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
 { N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"),
-  "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak",
+  "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
   N_("Inherit"), N_("Ignore") };
 
 char const * GUISeriesNames[4] =
@@ -65,7 +65,7 @@ char const * GUIMiscNames[5] =
 //
 char const * LyXFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
 { "roman", "sans", "typewriter", "symbol",
-  "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak",
+  "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
   "default", "error" };
 
 char const * LyXSeriesNames[4] =
index 3cb1edd795f79042cb6fd6766691007d4c1362de..39da3b0489144900d703993f43cfb76f15f749eb 100644 (file)
@@ -59,6 +59,8 @@ public:
                ///
                EUFRAK_FAMILY,
                ///
+               WASY_FAMILY,
+               ///
                INHERIT_FAMILY,
                ///
                IGNORE_FAMILY,
@@ -425,6 +427,7 @@ bool LyXFont::isSymbolFont() const
        case LyXFont::CMEX_FAMILY:
        case LyXFont::MSA_FAMILY:
        case LyXFont::MSB_FAMILY:
+       case LyXFont::WASY_FAMILY:
                return true;
        default:
                return false;
index 1d27ce03cb73fa40cfe94c542538f348a39e87a3..81d3cc4bfd102a883edee24eae75e8f843652f5f 100644 (file)
@@ -55,3 +55,9 @@ void MathBraceInset::normalize(NormalStream & os) const
 {
        os << "[block " << cell(0) << ']';
 }
+
+
+void MathBraceInset::infoize(std::ostream & os) const
+{
+       os << "Nested Block: ";
+}
index a240999731713eb09e54e35863d3c4d2f9a37d04..c655c9fe1bded922ae33bf720a02f87088dcd949 100644 (file)
@@ -29,6 +29,8 @@ public:
        void normalize(NormalStream & ns) const;
        ///
        void metrics(MathMetricsInfo & mi) const;
+       ///
+       void MathBraceInset::infoize(std::ostream & os) const;
 
 private:
        /// width of brace character
index a0b5e7578c1d5c0a39fea4eb2c877aed299909cb..4fc64187ec9e008e49fdd0ff65f846c14bfed1d3 100644 (file)
@@ -727,6 +727,7 @@ void MathCursor::getPos(int & x, int & y)
        if (array().empty())
                x += 2;
        y = xarray().yo();
+       lyxerr << "getPos: " << x << " " << y << "\n";
 }
 
 
@@ -768,7 +769,7 @@ MathCursor::pos_type & MathCursor::pos()
 
 MathUnknownInset * MathCursor::inMacroMode() const
 {
-       if (pos() == 0)
+       if (!hasPrevAtom())
                return 0;
        MathUnknownInset * p = prevAtom()->asUnknownInset();
        return (p && !p->final()) ? p : 0;
@@ -1444,10 +1445,15 @@ bool MathCursor::interpret(char c)
                return true;
        }
 
-       // leave autocorrect mode if necessary
-       if (autocorrect_ && c == ' ') {
-               autocorrect_ = false;
-               return true;
+       // This is annoying as one has to press <space> far too often.
+       // Disable it.
+
+       if (0) {
+               // leave autocorrect mode if necessary
+               if (autocorrect_ && c == ' ') {
+                       autocorrect_ = false;
+                       return true;
+               }
        }
 
        // just clear selection on pressing the space bar
@@ -1536,8 +1542,8 @@ bool MathCursor::interpret(char c)
 */
 
        // try auto-correction
-       if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c))
-               return true;
+       //if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c))
+       //      return true;
 
        // no special circumstances, so insert the character without any fuss
        insert(c);
index 3c77873eed431207bf50ab930701f927cf98bb41..739a945f5c636ecc5c74684a8398f6c330e50ad0 100644 (file)
@@ -193,6 +193,7 @@ void MathHullInset::metrics(MathMetricsInfo & mi) const
        // for markers
        width_   += 2;
        descent_ += 1;
+       ascent_  += 1;
 }
 
 
@@ -210,7 +211,7 @@ void MathHullInset::draw(MathPainterInfo & pi, int x, int y) const
                }
        }
 
-       drawMarkers(pi, x, y);
+       drawMarkers2(pi, x, y);
 }
 
 
index 9ebc37d227c9783b60d62067b09a28d0e5338667..a02fa2ccfdcfb1d4f0f46c9a2750093fe9729b0a 100644 (file)
@@ -554,6 +554,7 @@ fontinfo fontinfos[] = {
        {"eufrak", LyXFont::EUFRAK_FAMILY, inh_series, inh_shape, LColor::math},
        {"msa",    LyXFont::MSA_FAMILY, inh_series, inh_shape, LColor::math},
        {"msb",    LyXFont::MSB_FAMILY, inh_series, inh_shape, LColor::math},
+       {"wasy",   LyXFont::WASY_FAMILY, inh_series, inh_shape, LColor::math},
        {"text",   inh_family, inh_series, inh_shape, LColor::black},
        {"textbf", inh_family, LyXFont::BOLD_SERIES, inh_shape, LColor::black},
        {"textit", inh_family, inh_series, LyXFont::ITALIC_SHAPE, LColor::black},