X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Ffont.hh;h=618d4f6ebb99cd38a5c768c40b7f6b75c5b061ff;hb=1e58c863bbaddd2f2dbebfde740ca842e8837a1c;hp=2ffa39a51b2ecd40b483cb68f7d6b935aeb8ce60;hpb=805a5dddce6d072c3a3e2485585ee5630688a845;p=chaz%2Fopenbox diff --git a/otk/font.hh b/otk/font.hh index 2ffa39a5..618d4f6e 100644 --- a/otk/font.hh +++ b/otk/font.hh @@ -2,18 +2,21 @@ #ifndef __font_hh #define __font_hh +#include "ustring.hh" +#include "truerendercontrol.hh" + extern "C" { #include #define _XFT_NO_COMPAT_ // no Xft 1 API #include } -#include -#include +#include namespace otk { class Color; +class Surface; class Font { /* @@ -54,19 +57,14 @@ public: inline const std::string &fontstring() const { return _fontstring; } - unsigned int height() const; - unsigned int maxCharWidth() const; + int height() const; + int maxCharWidth() const; - unsigned int measureString(const std::string &string, - bool utf8 = true) const; + int measureString(const ustring &string) 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! :) - */ - void drawString(XftDraw *d, int x, int y, const Color &color, - const std::string &string, bool utf8 = true) const; + // The RenderControl classes use the internal data to render the fonts, but + // noone else needs it, so its private. + friend class RenderControl; }; }