#include "frontends/lyx_gui.h"
+#include "support/convert.h"
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/systemcall.h"
#include <ApplicationServices/ApplicationServices.h>
#endif
-namespace {
-void addFontPath()
+
+void qfont_loader::addToFontPath()
{
#ifdef Q_WS_X11
string const dir = OnlyPath(LibFileSearch("xfonts", "fonts.dir"));
<< endl;
}
#endif
+}
+
+void qfont_loader::initFontPath()
+{
#ifdef Q_WS_MACX
CFBundleRef myAppBundle = CFBundleGetMainBundle();
CFURLRef myAppResourcesURL, FontsURL;
#endif
}
+namespace {
struct symbol_font {
LyXFont::FONT_FAMILY lyx_family;
}
}
- font.setPointSizeFloat(lyxrc.font_sizes[f.size()]
+ font.setPointSizeFloat(convert<double>(lyxrc.font_sizes[f.size()])
* lyxrc.zoom / 100.0);
switch (f.series()) {
{
if (!lyx_gui::use_gui)
return false;
-#ifdef Q_WS_MACX
- static bool need_bundle_fonts = true;
- if (need_bundle_fonts) {
- addFontPath();
- need_bundle_fonts = false;
- }
-#endif
static vector<bool> cache_set(LyXFont::NUM_FAMILIES, false);
static vector<bool> cache(LyXFont::NUM_FAMILIES, false);
return false;
first_time = false;
- addFontPath();
+ addToFontPath();
tmp = getSymbolFont(pat);
if (tmp.second) {
cache[family] = true;