]> git.lyx.org Git - lyx.git/blobdiff - src/FontLoader.C
removed a warning from screen and added CFLAGS in lyx.spec.in.
[lyx.git] / src / FontLoader.C
index a46495f16bf9f503b39681b79462165bc2457dee..6f1480c31488beedfe88af2578db2412bb0b2295 100644 (file)
@@ -10,8 +10,8 @@
  *======================================================*/
 
 #include <config.h>
-#include <math.h>      // fabs()
-#include <stdlib.h>    // atoi()
+#include <cmath>       // fabs()
+#include <cstdlib>     // atoi()
 
 #ifdef __GNUG__
 #pragma implementation "FontLoader.h"
@@ -20,7 +20,7 @@
 #include "gettext.h"
 #include "FontLoader.h"
 #include "FontInfo.h"
-#include "error.h"
+#include "debug.h"
 #include "lyxrc.h"     // lyxrc.font_*
 extern LyXRC * lyxrc;
 #include "minibuffer.h"
@@ -98,11 +98,11 @@ void FontLoader::getFontinfo(LyXFont::FONT_FAMILY family,
        }
 
        // Normal font. Let's search for an existing name that matches.
-       LString ffamily;
-       LString fseries;
-       LString fshape;
-       LString norm = lyxrc->font_norm;
-       LString fontname;
+       string ffamily;
+       string fseries;
+       string fshape;
+       string norm = lyxrc->font_norm;
+       string fontname;
 
        FontInfo * fi = new FontInfo();
        fontinfo[family][series][shape] = fi;
@@ -205,11 +205,11 @@ XFontStruct* FontLoader::doLoad(LyXFont::FONT_FAMILY family,
        int fsize = (int) ( (lyxrc->font_sizes[size] * lyxrc->dpi * 
                                (lyxrc->zoom/100.0) ) / 72.27 + 0.5 );
 
-       LString font = fontinfo[family][series][shape]->getFontname(fsize);
+       string font = fontinfo[family][series][shape]->getFontname(fsize);
 
        if (font.empty()) {
-               lyxerr.print("No font matches request. Using 'fixed'.");
-               lyxerr.print("Start LyX as 'lyx -dbg 515' to get more information.");
+               lyxerr << "No font matches request. Using 'fixed'." << endl;
+               lyxerr << "Start LyX as 'lyx -dbg 515' to get more information." << endl;
                font = "fixed";
        }
 
@@ -220,13 +220,13 @@ XFontStruct* FontLoader::doLoad(LyXFont::FONT_FAMILY family,
 
        if (fs == 0) {
                if (font=="fixed") {
-                       lyxerr.print("We're doomed. Can't get 'fixed' font.");
+                       lyxerr << "We're doomed. Can't get 'fixed' font." << endl;
                } else {
-                       lyxerr.print("Could not get font. Using 'fixed'.");
+                       lyxerr << "Could not get font. Using 'fixed'." << endl;
                        fs = XLoadQueryFont(fl_display, "fixed");
                }
        } else {
-               if (lyxerr.debugging(Error::FONT)) {
+               if (lyxerr.debugging(Debug::FONT)) {
                        // Tell user the font matching
                        LyXFont f;
                        f.setFamily(family);
@@ -239,8 +239,8 @@ XFontStruct* FontLoader::doLoad(LyXFont::FONT_FAMILY family,
                        f.setNoun(LyXFont::INHERIT);
                        f.setLatex(LyXFont::INHERIT);
                        f.setColor(LyXFont::INHERIT_COLOR);
-                       lyxerr.print(LString("Font '") + f.stateText() 
-                                     + "' matched by\n" + font + '\n');
+                       lyxerr << "Font '" << f.stateText() 
+                              << "' matched by\n" << font << endl;
                }
        }
        minibuffer->Reset();