X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Ffont.hh;h=2ffa39a51b2ecd40b483cb68f7d6b935aeb8ce60;hb=805a5dddce6d072c3a3e2485585ee5630688a845;hp=8e736d8eb746c3958c3b24ddd41ead0c4ec2f92f;hpb=a4d4aaec3f75fb26bae76e8a5f4957378deb2748;p=chaz%2Fopenbox diff --git a/otk/font.hh b/otk/font.hh index 8e736d8e..2ffa39a5 100644 --- a/otk/font.hh +++ b/otk/font.hh @@ -2,8 +2,6 @@ #ifndef __font_hh #define __font_hh -#include "userstring.hh" - extern "C" { #include #define _XFT_NO_COMPAT_ // no Xft 1 API @@ -11,7 +9,6 @@ extern "C" { } #include - #include namespace otk { @@ -60,24 +57,16 @@ public: unsigned int height() const; unsigned int maxCharWidth() const; - //! Measures the length of a string - /*! - @param string The string to measure, it should be UTF8 encoded. - */ - unsigned int measureString(const userstring &string) const; + unsigned int measureString(const std::string &string, + bool utf8 = true) const; //! Draws a string into an XftDraw object /*! Be Warned: If you use an XftDraw object and a color, or a font from different screens, you WILL have unpredictable results! :) - @param d The drawable to render into. - @param x The X offset onto the drawable at which to start drawing. - @param x The Y offset onto the drawable at which to start drawing. - @param color The color to use for drawing the text. - @param string The string to draw, it should be UTF8 encoded. */ void drawString(XftDraw *d, int x, int y, const Color &color, - const userstring &string) const; + const std::string &string, bool utf8 = true) const; }; }