boost::scoped_ptr<customFont> myFont(new CustomFont(graphics(), "nameOfFile.ttf", 30)); // being 30 the font height
myFont -> draw ("Hello", x, y, z);
// members
myFont -> name(); // returns "nameOfFile.ttf"
myFont -> height(); // returns 30
myFont -> textWidth("text");
void draw(){
wstring a = L"Perro";
fuente -> draw(a, 10, 10, 1., 1,1, Gosu::Color(0xffffffff));
fuente -> draw(a, 10, 30, 1., 1,1, Gosu::Color(255, 255,0,0));
}



Bitmap bmp;
bmp.resize(charWidth, height);drawText is called. Depending on the font, drawText may call PangoRenderer's or SDLTTFRenderer's drawText. bmp.insert:if(bmp.height() < temp.height()){
bmp.resize(bmp.width(), temp.height());
}
Powered by mwForum 2.29.0 © 1999-2013 Markus Wichitill