X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Ffont.hh;h=afc36deafa06f4599e19e049cc7c745ee41f3d17;hb=3fe7bded58fb82fd2c1c2a5f9ad2e8f453fa0609;hp=9091b9bcf857638ba9f3bbfb65147000fcfd7eac;hpb=8f8acc24933830d4f5784616b9b0c5896bde0b93;p=chaz%2Fopenbox diff --git a/otk/font.hh b/otk/font.hh index 9091b9bc..afc36dea 100644 --- a/otk/font.hh +++ b/otk/font.hh @@ -2,6 +2,9 @@ #ifndef __font_hh #define __font_hh +#include "ustring.hh" +#include "truerendercontrol.hh" + extern "C" { #include #define _XFT_NO_COMPAT_ // no Xft 1 API @@ -9,11 +12,11 @@ extern "C" { } #include -#include namespace otk { class Color; +class Surface; class Font { /* @@ -57,16 +60,11 @@ public: unsigned int height() const; unsigned int maxCharWidth() const; - unsigned int measureString(const std::string &string, - bool utf8 = false) const; + unsigned 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 = false) const; + // The RenderControl classes use the internal data to render the fonts, but + // noone else needs it, so its private. + friend class RenderControl; }; }