1 // -*- mode: C++; indent-tabs-mode: nil; -*-
8 #include <X11/Xft/Xft.h>
26 static std::string _fallback_font;
29 // the fallback is only used for X fonts, not for Xft fonts, since it is
30 // assumed that X fonts will be the fallback from Xft.
31 inline static std::string fallbackFont(void) { return _fallback_font; }
32 inline static void setFallbackFont(const std::string &f)
33 { _fallback_font = f; }
43 bool _simplename; // true if not spec'd as a -*-* string
50 unsigned char _offset;
55 bool createXftFont(void);
61 BFont(Display *d, BScreen *screen, const std::string &family, int size,
62 bool bold, bool italic, bool shadow, unsigned char offset,
63 unsigned char tint, bool antialias = True);
66 inline bool valid(void) const { return _valid; }
68 inline std::string family(void) const { assert(_valid); return _family; }
69 inline int size(void) const { assert(_valid); return _size; }
70 inline bool bold(void) const { assert(_valid); return _bold; }
71 inline bool italic(void) const { assert(_valid); return _italic; }
73 unsigned int height(void) const;
74 unsigned int maxCharWidth(void) const;
76 unsigned int measureString(const std::string &string) const;
78 void drawString(Drawable d, int x, int y, const BColor &color,
79 const std::string &string) const;