1 // -*- mode: C++; indent-tabs-mode: nil; -*-
7 #include <X11/Xft/Xft.h>
25 static std::string _fallback_font;
28 // the fallback is only used for X fonts, not for Xft fonts, since it is
29 // assumed that X fonts will be the fallback from Xft.
30 inline static std::string fallbackFont(void) { return _fallback_font; }
31 inline static void setFallbackFont(const std::string &f)
32 { _fallback_font = f; }
41 bool _simplename; // true if not spec'd as a -*-* string
48 unsigned char _offset;
53 bool createXftFont(void);
59 BFont(int screen_num, const std::string &family, int size,
60 bool bold, bool italic, bool shadow, unsigned char offset,
61 unsigned char tint, bool antialias = True);
64 inline bool valid(void) const { return _valid; }
66 inline std::string family(void) const { assert(_valid); return _family; }
67 inline int size(void) const { assert(_valid); return _size; }
68 inline bool bold(void) const { assert(_valid); return _bold; }
69 inline bool italic(void) const { assert(_valid); return _italic; }
71 unsigned int height(void) const;
72 unsigned int maxCharWidth(void) const;
74 unsigned int measureString(const std::string &string) const;
76 void drawString(Drawable d, int x, int y, const BColor &color,
77 const std::string &string) const;