X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Ffont.cc;h=4fc09fcfdbad1fee17e0a615ecff4e371cb792e8;hb=e64d90be4d5b86a497ed8f03c6ba40512765e239;hp=21b9bfb060d505d9cf2e9e66958c01bd197a286a;hpb=46441f7d60c008b11a170516734ae7a5932a738e;p=chaz%2Fopenbox diff --git a/otk/font.cc b/otk/font.cc index 21b9bfb0..4fc09fcf 100644 --- a/otk/font.cc +++ b/otk/font.cc @@ -82,7 +82,7 @@ Font::~Font(void) } -unsigned int Font::measureString(const ustring &string) const +int Font::measureString(const ustring &string) const { XGlyphInfo info; @@ -93,19 +93,19 @@ unsigned int Font::measureString(const ustring &string) const XftTextExtents8(**display, _xftfont, (FcChar8*)string.c_str(), string.bytes(), &info); - return info.xOff + (_shadow ? _offset : 0); + return (signed) info.xOff + (_shadow ? _offset : 0); } -unsigned int Font::height(void) const +int Font::height(void) const { - return _xftfont->height + (_shadow ? _offset : 0); + return (signed) _xftfont->height + (_shadow ? _offset : 0); } -unsigned int Font::maxCharWidth(void) const +int Font::maxCharWidth(void) const { - return _xftfont->max_advance_width; + return (signed) _xftfont->max_advance_width; } }