aboutsummaryrefslogtreecommitdiff
path: root/src/XmbFontImp.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-16 23:31:10 (GMT)
committerfluxgen <fluxgen>2002-10-16 23:31:10 (GMT)
commit4b412d94b1c0abef0736ecda19b136fb25ca1a9b (patch)
tree5f60a200ee64cc83c4049656c7ce17da9e664e4c /src/XmbFontImp.cc
parentd9483d04fbcc7da8ca17f65ae87a138433b27ad9 (diff)
downloadfluxbox-4b412d94b1c0abef0736ecda19b136fb25ca1a9b.zip
fluxbox-4b412d94b1c0abef0736ecda19b136fb25ca1a9b.tar.bz2
minor stuff
Diffstat (limited to 'src/XmbFontImp.cc')
-rw-r--r--src/XmbFontImp.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/XmbFontImp.cc b/src/XmbFontImp.cc
index b39e463..d5d536b 100644
--- a/src/XmbFontImp.cc
+++ b/src/XmbFontImp.cc
@@ -19,7 +19,7 @@
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: XmbFontImp.cc,v 1.1 2002/10/13 22:22:14 fluxgen Exp $ 22// $Id: XmbFontImp.cc,v 1.2 2002/10/16 23:31:10 fluxgen Exp $
23 23
24#include "XmbFontImp.hh" 24#include "XmbFontImp.hh"
25 25
@@ -35,6 +35,8 @@
35#endif // HAVE_SETLOCALE 35#endif // HAVE_SETLOCALE
36 36
37#include <cstdarg> 37#include <cstdarg>
38#include <iostream>
39using namespace std;
38 40
39namespace { 41namespace {
40 42
@@ -157,6 +159,13 @@ XFontSet createFontSet(const char *fontname) {
157}; 159};
158 160
159XmbFontImp::XmbFontImp(const char *filename, bool utf8):m_fontset(0), m_utf8mode(utf8) { 161XmbFontImp::XmbFontImp(const char *filename, bool utf8):m_fontset(0), m_utf8mode(utf8) {
162#ifdef DEBUG
163#ifdef X_HAVE_UTF8_STRING
164 cerr<<"Using utf8 = "<<utf8<<endl;
165#else // X_HAVE_UTF8_STRING
166 cerr<<"Using uft8 = false"<<endl;
167#endif //X_HAVE_UTF8_STRING
168#endif // DEBUG
160 if (filename != 0) 169 if (filename != 0)
161 load(filename); 170 load(filename);
162} 171}
@@ -199,7 +208,7 @@ void XmbFontImp::drawText(Drawable w, int screen, GC gc, const char *text,
199 } 208 }
200} 209}
201 210
202unsigned int XmbFontImp::textWidth(const char *text, unsigned int len) const { 211unsigned int XmbFontImp::textWidth(const char * const text, unsigned int len) const {
203 if (m_fontset == 0) 212 if (m_fontset == 0)
204 return 0; 213 return 0;
205 XRectangle ink, logical; 214 XRectangle ink, logical;