wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

font.cpp (570B)


      1 // Copyright (c) 2003 - 2009 Anselm R Garbe <anselm@garbe.us>
      2 // See LICENSE for license details.
      3 
      4 #include "font.h"
      5 
      6 #include "xcore.h"
      7 #include "xfont.h"
      8 #include "xftfont.h"
      9 
     10 WFont::WFont(Monitor *monitor) {
     11     monitor_ = monitor;
     12 }
     13 
     14 WFont::~WFont() {
     15 }
     16 
     17 WFont *WFont::load(Monitor *monitor, string name) {
     18 
     19     WFont *font = XFont::load(monitor, name);
     20 #ifdef XFT_SUPPORT
     21     if (!font) {
     22         // fallback if XFT_SUPPORT enabled
     23         font = WXftFont::load(monitor, name);
     24     }
     25 #endif
     26     return font;
     27 }
     28 
     29 
     30 WFont::Type WFont::type() const{
     31     return type_;
     32 }