Re: [UFO-devel] Can't set a font
Status: Beta
Brought to you by:
schmidtjf
From: Johannes S. <sch...@us...> - 2005-07-07 08:17:57
|
Hi, Am Mittwoch 06 Juli 2005 22:00 schrieb Mark Robson: > I am very impressed with the quality of this library, but very > unimpressed with the quality of the documentation. > > Specifically, there is no overview as to how to use the library > generally - although the examples helped, it seems they did not call > every thing. > > I don't understand how the garbage collection works - I'll assume for > the time being that it just does. > > Anyway, I'm trying to set the font of a widget (ULabel) to something > other than the default, but it crashes almost immediately afterwards. > > I've modified the "layouts" example, and I've tried putting the > ->setFont in various different places, but it makes little difference. > > I'm doing something like > > label->setFont(new UFont(UFontInfo::SansSerif, 16)); > > at about line 151 of layouts.cpp [...] > What am I doing wrong? I am using libufo 0.7.4 on Linux with OpenGL > and the Nvidia drivers - other opengl applications work fine. There seems to be a serious bug with setting fonts in 0.7.4. Possibly the font is destructed by the graphics object ...? Well, I haven't used 0.7.4 for weeks, as I am working on the new 0.8.0 release. Setting fonts with this release should work (it uses objects created on the stack, no pointers). Unfortunately, this release is delayed until the end of the semester (have to write several exams) which is ca. Mid July. Perhaps you want to try one of the snapshots from http://libufo.sourceforge.net/snapshots/ Regards, Johannes |