-// -*- C++ -*-
/* This file is part of
* ======================================================
*
#include <config.h>
#include <cmath> // fabs()
-#include FORMS_H_LOCATION
-
#ifdef __GNUG__
#pragma implementation "FontInfo.h"
#endif
#include "debug.h"
#include "lyxrc.h" // lyxrc.use_scalable_fonts
#include "support/lstrings.h"
+#include "support/lyxlib.h"
+#include "frontends/GUIRunTime.h"
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::fabs;
+#endif
+
/// Load font close to this size
string const FontInfo::getFontname(int size)
{
lyxerr[Debug::FONT] << "Exact font match with\n"
<< strings[i] << endl;
return strings[i];
- } else if (std::fabs(sizes[i] - size - 0.1) < error) {
- error = std::fabs(sizes[i] - size - 0.1);
+ } else if (fabs(sizes[i] - size - 0.1) < error) {
+ error = fabs(sizes[i] - size - 0.1);
closestind = i;
}
}
char ** list = 0;
if (lyxrc.use_gui)
- list = XListFonts(fl_get_display(), pattern.c_str(), 100, &matches);
+ list = XListFonts(GUIRunTime::x11Display(), pattern.c_str(),
+ 100, &matches);
if (list == 0) {
// No fonts matched