]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/xftFontLoader.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / xftFontLoader.C
index 098f7a5afc9c22039f7cd5d0268906155a5e57a0..408a46398b3667fe8b8cfdfcf10d0246b6b209a0 100644 (file)
@@ -9,24 +9,32 @@
  */
 
 #include <config.h>
-#include <gtkmm.h>
-#include <cmath>       // fabs()
 
-#include <X11/Xft/Xft.h>
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
+
 #include "xftFontLoader.h"
 #include "FontInfo.h"
 #include "gettext.h"
 #include "debug.h"
 #include "lyxrc.h"     // lyxrc.font_*
 #include "BufferView.h"
+#include "GtkmmX.h"
+
 #include "frontends/LyXView.h"
+#include "frontends/lyx_gui.h"
+
 #include "support/systemcall.h"
 #include "support/filetools.h"
-#include "GtkmmX.h"
+
+#include <cmath>       // fabs()
 #include <vector>
-#include "frontends/lyx_gui.h"
+
 
 using std::endl;
+using std::string;
 
 // The global fontLoader
 xftFontLoader fontLoader;
@@ -132,7 +140,7 @@ XftPattern * xftFontLoader::getFontPattern(LyXFont::FONT_FAMILY family,
        case LyXFont::BOLD_SERIES:
                fweight = XFT_WEIGHT_BOLD;
                break;
-       default: 
+       default:
                fweight = XFT_WEIGHT_MEDIUM;
                break;
        }
@@ -148,7 +156,7 @@ XftPattern * xftFontLoader::getFontPattern(LyXFont::FONT_FAMILY family,
        case LyXFont::SLANTED_SHAPE:
                fslant = XFT_SLANT_OBLIQUE;
                break;
-       default: 
+       default:
                fslant = XFT_SLANT_ROMAN;
                break;
        }
@@ -166,10 +174,10 @@ XftFont * xftFontLoader::doLoad(LyXFont::FONT_FAMILY family,
                               LyXFont::FONT_SHAPE shape,
                               LyXFont::FONT_SIZE size)
 {
-       XftPattern *fpat = getFontPattern(family, series, shape, size);
+       XftPattern * fpat = getFontPattern(family, series, shape, size);
        XftResult result;
-       XftPattern *fpat2 = XftFontMatch(getDisplay(), getScreen(),
-                                        fpat, &result);
+       XftPattern * fpat2 = XftFontMatch(getDisplay(), getScreen(),
+                                         fpat, &result);
        XftFont * font = XftFontOpenPattern(getDisplay(), fpat2);
        fonts_[family][series][shape][size] = font;
        return font;
@@ -192,11 +200,11 @@ bool xftFontLoader::available(LyXFont const & f)
        string const ffamily = familyString(family);
        if (isSpecial(f)) {
                cache_set[family] = true;
-               XftPattern *fpat = XftPatternCreate();
+               XftPattern * fpat = XftPatternCreate();
                XftPatternAddString(fpat, XFT_FAMILY, ffamily.c_str());
                XftResult result;
-               XftPattern *fpat2 = XftFontMatch(getDisplay(), getScreen(),
-                                                fpat, &result);
+               XftPattern * fpat2 = XftFontMatch(getDisplay(), getScreen(),
+                                                 fpat, &result);
                XftPatternDestroy(fpat);
                char * familyM;
                XftPatternGetString(fpat2, XFT_FAMILY, 0, &familyM);