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.hh21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh
index 720a01e..eadde6f 100644
--- a/src/FbTk/Font.hh
+++ b/src/FbTk/Font.hh
@@ -27,16 +27,11 @@
27#include <X11/Xlib.h> 27#include <X11/Xlib.h>
28#include <X11/Xresource.h> 28#include <X11/Xresource.h>
29 29
30#include <string>
31
32#ifdef HAVE_CONFIG_H 30#ifdef HAVE_CONFIG_H
33#include "config.h" 31#include "config.h"
34#endif // HAVE_CONFIG_H 32#endif // HAVE_CONFIG_H
35 33
36#ifdef HAVE_ICONV 34#include "FbString.hh"
37#include <iconv.h>
38#endif // HAVE_ICONV
39
40#include "Color.hh" 35#include "Color.hh"
41#include "Text.hh" 36#include "Text.hh"
42 37
@@ -51,10 +46,7 @@ class FbDrawable;
51class Font { 46class Font {
52public: 47public:
53 48
54 /// called at FbTk::App creation time, initializes some stuff 49 /// called at FbTk::App destruction time, cleans up cache
55 static void init();
56
57 /// called at FbTk::App destruction time, cleans up what was inited first
58 static void shutdown(); 50 static void shutdown();
59 51
60 /// @return true if multibyte is enabled, else false 52 /// @return true if multibyte is enabled, else false
@@ -86,7 +78,7 @@ public:
86 @param size length of text in bytes 78 @param size length of text in bytes
87 @return size of text in pixels 79 @return size of text in pixels
88 */ 80 */
89 unsigned int textWidth(const char * const text, unsigned int size) const; 81 unsigned int textWidth(const FbString &text, unsigned int size) const;
90 unsigned int height() const; 82 unsigned int height() const;
91 int ascent() const; 83 int ascent() const;
92 int descent() const; 84 int descent() const;
@@ -110,7 +102,7 @@ public:
110 @param rotate if the text should be drawn rotated (if it's rotated before) 102 @param rotate if the text should be drawn rotated (if it's rotated before)
111 */ 103 */
112 void drawText(const FbDrawable &w, int screen, GC gc, 104 void drawText(const FbDrawable &w, int screen, GC gc,
113 const char *text, size_t len, 105 const FbString &text, size_t len,
114 int x, int y, FbTk::Orientation orient = ROT0) const; 106 int x, int y, FbTk::Orientation orient = ROT0) const;
115 107
116 bool hasShadow() const { return m_shadow; } 108 bool hasShadow() const { return m_shadow; }
@@ -130,11 +122,6 @@ private:
130 int m_shadow_offy; ///< offset x for shadow 122 int m_shadow_offy; ///< offset x for shadow
131 bool m_halo; ///< halo text 123 bool m_halo; ///< halo text
132 Color m_halo_color; ///< halo color 124 Color m_halo_color; ///< halo color
133#ifdef HAVE_ICONV
134 iconv_t m_iconv;
135#else
136 int m_iconv;
137#endif // HAVE_ICONV
138}; 125};
139 126
140} //end namespace FbTk 127} //end namespace FbTk