aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-11-17 17:20:49 (GMT)
committerfluxgen <fluxgen>2002-11-17 17:20:49 (GMT)
commit9a9e59a233844546f0d923989f65e416ff350ee0 (patch)
tree74101a18cc421760344ec9bf57874590f8691009
parentee5cecd7fbfed78736c2415a05384f833fe31f8d (diff)
downloadfluxbox-9a9e59a233844546f0d923989f65e416ff350ee0.zip
fluxbox-9a9e59a233844546f0d923989f65e416ff350ee0.tar.bz2
config.h with have_xft_utf8
-rw-r--r--src/XftFontImp.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/XftFontImp.cc b/src/XftFontImp.cc
index f3da167..5104ce0 100644
--- a/src/XftFontImp.cc
+++ b/src/XftFontImp.cc
@@ -19,11 +19,15 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22//$Id: XftFontImp.cc,v 1.3 2002/10/16 23:56:13 fluxgen Exp $ 22//$Id: XftFontImp.cc,v 1.4 2002/11/17 17:20:49 fluxgen Exp $
23 23
24#include "XftFontImp.hh" 24#include "XftFontImp.hh"
25#include "BaseDisplay.hh" 25#include "BaseDisplay.hh"
26 26
27#ifdef HAVE_CONFIG_H
28#include "config.h"
29#endif //HAVE_CONFIG_H
30
27XftFontImp::XftFontImp(const char *name, bool utf8):m_xftfont(0), 31XftFontImp::XftFontImp(const char *name, bool utf8):m_xftfont(0),
28m_utf8mode(utf8) { 32m_utf8mode(utf8) {
29 if (name != 0) 33 if (name != 0)
@@ -86,7 +90,7 @@ void XftFontImp::drawText(Drawable w, int screen, GC gc, const char *text, size_
86 &rendcol, &xftcolor); 90 &rendcol, &xftcolor);
87 91
88 // draw string 92 // draw string
89#ifdef X_HAVE_UTF8_STRING 93#ifdef HAVE_XFT_UTF8_STRING
90 if (m_utf8mode) { 94 if (m_utf8mode) {
91 XftDrawStringUtf8(draw, 95 XftDrawStringUtf8(draw,
92 &xftcolor, 96 &xftcolor,
@@ -94,7 +98,7 @@ void XftFontImp::drawText(Drawable w, int screen, GC gc, const char *text, size_
94 x, y, 98 x, y,
95 (XftChar8 *)(text), len); 99 (XftChar8 *)(text), len);
96 } else 100 } else
97#endif // X_HAVE_UTF8_STRING 101#endif // HAVE_XFT_UTF8_STRING
98 { 102 {
99 XftDrawString8(draw, 103 XftDrawString8(draw,
100 &xftcolor, 104 &xftcolor,
@@ -112,14 +116,14 @@ unsigned int XftFontImp::textWidth(const char * const text, unsigned int len) co
112 if (m_xftfont == 0) 116 if (m_xftfont == 0)
113 return 0; 117 return 0;
114 XGlyphInfo ginfo; 118 XGlyphInfo ginfo;
115#ifdef X_HAVE_UTF8_STRING 119#ifdef HAVE_XFT_UTF8_STRING
116 if (m_utf8mode) { 120 if (m_utf8mode) {
117 XftTextExtentsUtf8(BaseDisplay::getXDisplay(), 121 XftTextExtentsUtf8(BaseDisplay::getXDisplay(),
118 m_xftfont, 122 m_xftfont,
119 (XftChar8 *)text, len, 123 (XftChar8 *)text, len,
120 &ginfo); 124 &ginfo);
121 } else 125 } else
122#endif //X_HAVE_UTF8_STRING 126#endif //HAVE_XFT_UTF8_STRING
123 { 127 {
124 XftTextExtents8(BaseDisplay::getXDisplay(), 128 XftTextExtents8(BaseDisplay::getXDisplay(),
125 m_xftfont, 129 m_xftfont,