#endif // HAVE_CONFIG_H
#include <assert.h>
-#include "display.hh"
+#include <iostream>
+#include "display.hh"
#include "util.hh"
#include "style.hh"
{
}
-Style::Style(unsigned int screen)
- : font(0), screen_number(screen)
-{
-}
-
-Style::Style(unsigned int screen, BImageControl *ctrl)
- : image_control(ctrl), font(0), screen_number(screen)
+Style::Style(BImageControl *ctrl)
+ : image_control(ctrl), font(0),
+ screen_number(ctrl->getScreenInfo()->getScreenNumber())
{
}
stick_button.mask = None;
}
-void Style::load(Configuration &style) {
+void Style::load(const Configuration &style) {
std::string s;
// load fonts/fontsets
BFont *Style::readDatabaseFont(const std::string &rbasename,
- const Configuration &style) {
+ const Configuration &style) {
std::string fontname;
std::string s;
return b;
delete b;
}
-
+
+ if (style.getValue(rbasename + "xft.font", s))
+ printf("Unable to load font \"%s\". Exiting\n", s.c_str());
+ else
+ printf("Font not defined by style. Exiting\n");
exit(2); // can't continue without a font
}