Text Size

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Elrinth
Just popping in
Just popping in
Posts: 8
Joined: Tue Apr 25, 2006 08:54

Text Size

Postby Elrinth » Tue Apr 25, 2006 10:32

Hi!

How do I make my StaticText bigger?
I try the following, but all it does is throw around the text on the screen.
<Property Name="SetWindowSize" Value="w:2.3 h:2.0" />
<Property Name="Size" Value="w:1.0 h:1.0" />

Any tip would be nice ;)

I tried calling a diffrent font but it doesn't work..

I specified 2 fonts in my .font file:
<Font Name="GringoNights" Filename="cegui:fonts/GringoNights.ttf" Type="Dynamic" Size="25" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false"/>
<Font Name="GringoNightsBig" Filename="cegui:fonts/GringoNights.ttf" Type="Dynamic" Size="50" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false"/>

GringoNights is set as default font and works like a clock

however I can never get GringoNightsBig when I try to use it via:
<Property Name="Font" Value="GringoNightsBig" />
in the .layout file


what is wrong?
why is things not working?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Apr 25, 2006 13:24

This has already been answered (partly) on IRC. A font does not automagically resize together with its parent widget. Such functionality would require a resize-handler which sets a new font based on the new size of the widget. Which is expensive, and rather impractical.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests