]> git.lyx.org Git - features.git/commitdiff
support for fraktur font in mathed
authorAndré Pönitz <poenitz@gmx.net>
Tue, 11 Dec 2001 10:14:51 +0000 (10:14 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 11 Dec 2001 10:14:51 +0000 (10:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3184 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/FontLoader.C
src/lyxfont.C
src/lyxfont.h
src/mathed/ChangeLog
src/mathed/math_data.h
src/mathed/math_defs.h
src/mathed/math_hash.C
src/mathed/math_parser.C
src/mathed/math_support.C

index d55f2671dc8e5c129d35af56aa7af8064aedcb71..6cb7b780cfc67b557ae18b1d53921a2780ea27a7 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-11  André Pönitz <poenitz@gmx.net>
+
+       * FontLoader.C:
+       * lyxfont.[Ch]: support for fraktur font used by \mathfrak
+
 2001-12-06  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_cb.C: another bv->text misuse, from insert label
index 273aab391029d1bbff6be2f8b632d2f5f09d4f1e..ae224352571115f87a9349fdd1551bf099434907 100644 (file)
@@ -141,6 +141,11 @@ void FontLoader::getFontinfo(LyXFont::FONT_FAMILY family,
                                new FontInfo("-*-msbm-*-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
+               case LyXFont::EUFRAK_FAMILY:
+                       fontinfo[family][series][shape] = 
+                               new FontInfo("-*-eufrak-*-*-*-*-*-*-*-*-*-*-*-*");
+                       return;
+
                default:
                        break;
        }
index f08de93fce142c16953653b53c0a30e1ca04ceac..d10d48769486adcc7a7b7e8851861a6fb15b48c8 100644 (file)
@@ -64,9 +64,9 @@ char const * GUIMiscNames[5] =
 //
 // Strings used to read and write .lyx format files
 //
-char const * LyXFamilyNames[12] = 
+char const * LyXFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] = 
 { "roman", "sans", "typewriter", "symbol",
-  "cmr", "cmsy", "cmm", "cmex", "msa", "msb",
+  "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak",
   "default", "error" };
 
 char const * LyXSeriesNames[4] = 
index 9bf18307d49d9bd4c76e9e93f0c06ddb35a7fc60..5d75c20f2eac7891981d12779e99584716bac2fc 100644 (file)
@@ -57,6 +57,8 @@ public:
                ///
                MSB_FAMILY,
                ///
+               EUFRAK_FAMILY,
+               ///
                INHERIT_FAMILY,
                ///
                IGNORE_FAMILY,
index 93231de893bcb7acbfed90620843d6d49222fd60..4910b9e724fe2c7cc89b6a04e93a249a60e2cfbd 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-11  André Pönitz <poenitz@gmx.net>
+
+       * math_defs.h:
+       * math_parser.C:
+       * math_hash.C: support for \mathfrak
+
 2001-12-12  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * math_streamstr.C: #include <iostream> to compile with DEC cxx
index b537e51d700dfb531211e47b494a3e08db036886..86b8125eda72eb97fb06bf904ad49fbeaae3d9a6 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef MATH_DATA_H
 #define MATH_DATA_H
 
+#include <iosfwd>
 #include <vector>
 
 #include "math_atom.h"
@@ -132,4 +133,8 @@ private:
        buffer_type bf_;
 };
 
+///
+std::ostream & operator<<(std::ostream & os, MathArray const & ar);
+
+
 #endif
index a787878d851359c93a168626cf5ca6208ea62460..adba3adb4ef08c14d92583d05086eeb1cb0e151c 100644 (file)
@@ -44,6 +44,8 @@ enum MathTextCodes  {
        ///
        LM_TC_CAL,
        ///
+       LM_TC_EUFRAK,
+       ///
        LM_TC_BF,
        //
        LM_TC_BB,
index 40297fc95309b31afdc3557217d00227aacf8a7b..cb86552258ad061be11c94aa98c2f8bf94cb861b 100644 (file)
@@ -92,6 +92,7 @@ key_type wordlist_array[] =
        {"mathbb",  LM_TK_FONT, LM_TC_BB},
        {"mathbf",  LM_TK_FONT, LM_TC_BF},
        {"mathcal",  LM_TK_FONT, LM_TC_CAL},
+       {"mathfrak",  LM_TK_FONT, LM_TC_EUFRAK},
        {"mathit",  LM_TK_FONT, LM_TC_IT},
        {"mathnormal",  LM_TK_FONT, LM_TC_VAR},
        {"mathrm",  LM_TK_FONT, LM_TC_RM},
index f0b6e4fa99d23cfb75d4d8fa0738fb2831f4e3f4..fe3244226cfd53b7c39498439965a5cab11cd0cb 100644 (file)
@@ -791,14 +791,14 @@ void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
                else if (t.cat() == catEnd) {
                        if (flags & FLAG_BRACE_LAST)
                                return;
-                       //lyxerr << "found '}' unexpectedly, array: '" << array << "'\n";
-                       lyxerr << "found '}' unexpectedly\n";
+                       lyxerr << "found '}' unexpectedly, array: '" << array << "'\n";
+                       //lyxerr << "found '}' unexpectedly\n";
                        add(array, '}', LM_TC_TEX);
                }
                
                else if (t.cat() == catAlign) {
-                       //lyxerr << "found tab unexpectedly, array: '" << array << "'\n";
-                       lyxerr << "found tab unexpectedly\n";
+                       lyxerr << "found tab unexpectedly, array: '" << array << "'\n";
+                       //lyxerr << "found tab unexpectedly\n";
                        add(array, '&', LM_TC_TEX);
                }
                
index 30f21f4ed522ec6fc89341d92be5a8c4e9f10fbc..3cc3cae92d1a3c7ad21dc96210638744d36ee52f 100644 (file)
@@ -78,6 +78,7 @@ enum MathFont {
        FONT_CMEX,
        FONT_MSA,
        FONT_MSB,
+       FONT_EUFRAK,
        FONT_NUM
 };
 
@@ -117,6 +118,7 @@ void mathed_init_fonts()
        MathFonts[FONT_CMEX].setFamily(LyXFont::CMEX_FAMILY);
        MathFonts[FONT_MSA].setFamily(LyXFont::MSA_FAMILY);
        MathFonts[FONT_MSB].setFamily(LyXFont::MSB_FAMILY);
+       MathFonts[FONT_EUFRAK].setFamily(LyXFont::EUFRAK_FAMILY);
 
        for (int i = 0; i < LM_FONT_END; ++i)
                font_available_initialized[i] = false;
@@ -182,6 +184,12 @@ LyXFont const & whichFontBase(MathTextCodes type)
        case LM_TC_MSB:
                return MathFonts[FONT_MSB];
 
+       case LM_TC_EUFRAK:
+               if (math_font_available(LM_TC_EUFRAK))
+                       return MathFonts[FONT_EUFRAK];
+               else
+                       return MathFonts[FONT_BB];
+
        default:
                break;
        }
@@ -744,6 +752,7 @@ char const * math_font_name(MathTextCodes code)
        static char const * theFontNames[] = {
                "mathrm",
                "mathcal",
+               "mathfrak",
                "mathbf",
                "mathbb",
                "mathsf",