]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FontInfo.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FontInfo.C
index f1eea2bc41b701abc0cba4955ae8b560d67639b8..d21f42df7c6c352e6d48f20983ac56f4ca3a0dcc 100644 (file)
@@ -6,25 +6,33 @@
  * \author Asger Alstrup
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "FontInfo.h"
+
 #include "debug.h"
 #include "lyxrc.h"     // lyxrc.use_scalable_fonts
 
+#include "frontends/lyx_gui.h"
+
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
+#include "support/tostr.h"
 
-#include <cmath>       // abs()
+#include "lyx_forms.h"
+
+#include <cmath>
+
+using lyx::support::atoi;
+using lyx::support::token;
 
-using std::endl;
 using std::abs;
+using std::endl;
+using std::string;
 
-#include FORMS_H_LOCATION
 
 /// Load font close to this size
 string const FontInfo::getFontname(int size)
@@ -115,7 +123,7 @@ void FontInfo::query()
        }
 
        char ** list = 0;
-       if (lyxrc.use_gui)
+       if (lyx_gui::use_gui)
                list = XListFonts(fl_get_display(), pattern.c_str(),
                                  100, &matches);
 
@@ -132,14 +140,14 @@ void FontInfo::query()
                        string name(list[i]);
                        lyxerr[Debug::FONT] << "match #" << i << ' '
                                            << name << endl;
-                       sizes[i] = lyx::atoi(token(name, '-', 7));
+                       sizes[i] = atoi(token(name, '-', 7));
                        strings[i] = name;
                        if (sizes[i] == 0) {
                                if (scaleindex == -1) {
                                        scaleindex = i;
                                }
                                scalable = true;
-                       } else if (lyx::atoi(token(name, '-', 12)) == 0)
+                       } else if (atoi(token(name, '-', 12)) == 0)
                                // Ignore bogus matches of scalable fonts.
                                sizes[i] = 0;
                };