Font sizing

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

alex
Just popping in
Just popping in
Posts: 8
Joined: Mon Jul 17, 2006 13:26

Font sizing

Postby alex » Mon Jul 17, 2006 15:56

I´m currently a little bit stucked with fonts in CEGUI, mainly scaling:

Is there a way to scale the label of a StaticText along with the size
of the StaticText Window, that way that i can resize the parent and
have nice scalings of the StaticText child´s labels?

In a menubar i have the problem, that unter certain screen resolutions
the text items are cutted at the end (only one half of a character). I use an auto scaled font and the MenuItem doesn´t seem to size correct to it´s string content.

many thanks for help

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Jul 17, 2006 19:30

The StaticText font scaling issue is not easily solved. I think you would have to take control of rendering the label text yourself and draw text that is scaled accordingly, by passing values in the optional 'scale' parameters of the Font::drawText type members. This is not an ideal solution, but it will work.

For the menu issue, it's been mentioned before, I think. Lindquist will be able to answer this point better than me.

HTH (if only a little)

CE.

alex
Just popping in
Just popping in
Posts: 8
Joined: Mon Jul 17, 2006 13:26

Postby alex » Mon Jul 17, 2006 20:33

thank you... where do i have to hook over in the rendering.. is there some type of draw notification/listener anywhere, or would it be better to
Subclass StaticText?

by the way another question: I use CEGUI Windows as billboards in
a faked 3D display, because i display text and images loaded from resources and do not want to render to textures for that task.
For Z-Sorting i currently detach all windows from there parent, do the sort
and add out the sorted list again. This works fine, but may be, there is a more performance wise solution (using moveToFront, moveToBack was slower in my test).
Is it faster to access Windows in there parent or the Manager by name or by pointer (what is the internal mapping)?

thanks again :-)
alex


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 7 guests