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.hh14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh
index 28bbf22..fb399d9 100644
--- a/src/FbTk/Font.hh
+++ b/src/FbTk/Font.hh
@@ -75,7 +75,11 @@ public:
75 @param size length of text in bytes 75 @param size length of text in bytes
76 @return size of text in pixels 76 @return size of text in pixels
77 */ 77 */
78 unsigned int textWidth(const FbString &text, unsigned int size) const; 78 unsigned int textWidth(const char* text, unsigned int size) const;
79 unsigned int textWidth(const BiDiString &text) const {
80 return textWidth(text.visual().c_str(), text.visual().size());
81 }
82
79 unsigned int height() const; 83 unsigned int height() const;
80 int ascent() const; 84 int ascent() const;
81 int descent() const; 85 int descent() const;
@@ -99,8 +103,14 @@ public:
99 @param rotate if the text should be drawn rotated (if it's rotated before) 103 @param rotate if the text should be drawn rotated (if it's rotated before)
100 */ 104 */
101 void drawText(const FbDrawable &w, int screen, GC gc, 105 void drawText(const FbDrawable &w, int screen, GC gc,
102 const FbString &text, size_t len, 106 const char* text, size_t len,
103 int x, int y, FbTk::Orientation orient = ROT0) const; 107 int x, int y, FbTk::Orientation orient = ROT0) const;
108 void drawText(const FbDrawable &w, int screen, GC gc,
109 const BiDiString &text,
110 int x, int y, FbTk::Orientation orient = ROT0) const {
111 drawText(w, screen, gc, text.visual().c_str(), text.visual().size(), x, y, orient);
112 }
113
104 114
105 bool hasShadow() const { return m_shadow; } 115 bool hasShadow() const { return m_shadow; }
106 bool hasHalo() const { return m_halo; } 116 bool hasHalo() const { return m_halo; }