aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Font.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Font.hh')
-rw-r--r--src/FbTk/Font.hh17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh
index fb399d9..6ea2571 100644
--- a/src/FbTk/Font.hh
+++ b/src/FbTk/Font.hh
@@ -43,17 +43,19 @@ class FbDrawable;
43class Font { 43class Font {
44public: 44public:
45 45
46 static const char DEFAULT_FONT[];
47
48
46 /// called at FbTk::App destruction time, cleans up cache 49 /// called at FbTk::App destruction time, cleans up cache
47 static void shutdown(); 50 static void shutdown();
48 51
49 /// @return true if multibyte is enabled, else false 52 /// @return true if multibyte is enabled, else false
50 static bool multibyte() { return s_multibyte; } 53 static bool multibyte();
51 /// @return true if utf-8 mode is enabled, else false 54 /// @return true if utf-8 mode is enabled, else false
52 static bool utf8() { return s_utf8mode; } 55 static bool utf8();
53
54 56
55 57
56 explicit Font(const char *name = "__DEFAULT__"); 58 explicit Font(const char* name = DEFAULT_FONT);
57 virtual ~Font(); 59 virtual ~Font();
58 /** 60 /**
59 Load a font 61 Load a font
@@ -76,9 +78,7 @@ public:
76 @return size of text in pixels 78 @return size of text in pixels
77 */ 79 */
78 unsigned int textWidth(const char* text, unsigned int size) const; 80 unsigned int textWidth(const char* text, unsigned int size) const;
79 unsigned int textWidth(const BiDiString &text) const { 81 unsigned int textWidth(const BiDiString &text) const;
80 return textWidth(text.visual().c_str(), text.visual().size());
81 }
82 82
83 unsigned int height() const; 83 unsigned int height() const;
84 int ascent() const; 84 int ascent() const;
@@ -119,9 +119,6 @@ private:
119 FbTk::FontImp* m_fontimp; ///< font implementation 119 FbTk::FontImp* m_fontimp; ///< font implementation
120 std::string m_fontstr; ///< font name 120 std::string m_fontstr; ///< font name
121 121
122 static bool s_multibyte; ///< if the fontimp should be a multibyte font
123 static bool s_utf8mode; ///< should the font use utf8 font imp
124
125 int m_angle; ///< rotation angle 122 int m_angle; ///< rotation angle
126 bool m_shadow; ///< shadow text 123 bool m_shadow; ///< shadow text
127 Color m_shadow_color; ///< shadow color 124 Color m_shadow_color; ///< shadow color