summaryrefslogtreecommitdiff
path: root/src/FbTk/XmbFontImp.cc
diff options
context:
space:
mode:
authormathias <mathias>2004-11-19 12:00:20 (GMT)
committermathias <mathias>2004-11-19 12:00:20 (GMT)
commit66a3fc1c4dfa2cb68e650257e0bd10f2906c0d39 (patch)
tree76f6052a4f5e52288107a78d4307fd719c20b5f6 /src/FbTk/XmbFontImp.cc
parent993c17cf2efd3caba5241276c268909197dd3681 (diff)
downloadfluxbox_lack-66a3fc1c4dfa2cb68e650257e0bd10f2906c0d39.zip
fluxbox_lack-66a3fc1c4dfa2cb68e650257e0bd10f2906c0d39.tar.bz2
fixes fontsituations when text disappears in non-antialias mode
primary problem was to use utf8 when in fact the FontSet wasnt utf8.
Diffstat (limited to 'src/FbTk/XmbFontImp.cc')
-rw-r--r--src/FbTk/XmbFontImp.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc
index fe222db..79a50fb 100644
--- a/src/FbTk/XmbFontImp.cc
+++ b/src/FbTk/XmbFontImp.cc
@@ -110,7 +110,7 @@ const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...) {
110 return 0; 110 return 0;
111} 111}
112 112
113XFontSet createFontSet(const char *fontname, bool utf8mode) { 113XFontSet createFontSet(const char *fontname, bool& utf8mode) {
114 Display *display = FbTk::App::instance()->display(); 114 Display *display = FbTk::App::instance()->display();
115 XFontSet fs; 115 XFontSet fs;
116 const int FONT_ELEMENT_SIZE=50; 116 const int FONT_ELEMENT_SIZE=50;
@@ -192,13 +192,15 @@ XFontSet createFontSet(const char *fontname, bool utf8mode) {
192 setlocale(LC_CTYPE, orig_locale.c_str()); 192 setlocale(LC_CTYPE, orig_locale.c_str());
193#endif // HAVE_SETLOCALE 193#endif // HAVE_SETLOCALE
194 194
195 utf8mode = false;
196
195 return fs; 197 return fs;
196} 198}
197 199
198}; 200};
199namespace FbTk { 201namespace FbTk {
200 202
201XmbFontImp::XmbFontImp(const char *filename, bool utf8):m_fontset(0), m_setextents(0), m_utf8mode(utf8) { 203XmbFontImp::XmbFontImp(const char *filename, bool utf8) : m_fontset(0), m_setextents(0), m_utf8mode(utf8) {
202 if (filename != 0) 204 if (filename != 0)
203 load(filename); 205 load(filename);
204} 206}
@@ -209,7 +211,7 @@ XmbFontImp::~XmbFontImp() {
209} 211}
210 212
211bool XmbFontImp::load(const std::string &fontname) { 213bool XmbFontImp::load(const std::string &fontname) {
212 if (fontname.size() == 0) 214 if (fontname.empty())
213 return false; 215 return false;
214 216
215 XFontSet set = createFontSet(fontname.c_str(), m_utf8mode); 217 XFontSet set = createFontSet(fontname.c_str(), m_utf8mode);