Hello,
I'm using Ogre as the graphics engine. Ogre has overlays which can show fonts. I can use the same true font for CEGUI. But do they use the same generated texture or they are separate?
Now I'd like to change the size of the font, which looks like I'd need to create another .font file which has a different font size. The question is how many font textures will I have now?
If I want to have a fixed width font, I simply can use a fixed width ttf (such as Courier New)?
Thank you.
Font size + Ogre explained?
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
Ogre and CEGUI will create their own texture, since both simply don't know about each other in that area.
And indeed, another font size means another representation hence more memory consumption. You might -at code level- fine grain the loading and destroying of fonts when they are (not) needed (anymore).
I think that -since a fixed width font is also a ttf- you can just use that like any other font.
HTH.
Ogre and CEGUI will create their own texture, since both simply don't know about each other in that area.
And indeed, another font size means another representation hence more memory consumption. You might -at code level- fine grain the loading and destroying of fonts when they are (not) needed (anymore).
I think that -since a fixed width font is also a ttf- you can just use that like any other font.
HTH.
Check out my released snake game using Cegui!
Re: Font size + Ogre explained?
sjcomp wrote:Now I'd like to change the size of the font, which looks like I'd need to create another .font file which has a different font size.
You should have a look at these:
http://www.cegui.org.uk/wiki/index.php/GameChatBox
http://www.cegui.org.uk/wiki/index.php/DynamicFont
Thanks scriptkid and Rackle!
I see, I thought that given that there is a CEGUIRenderer in ogre it also handles fonts. But if I use a texture for an imageset and the same texture for an overlay, would it be loaded twice?
I see, my understanding is that using this cod for dynamic font results in the same memory consumption as if I'd use font file. If I only need two font sizes, both of which are constantly used in the menu then there is no real need to use dynamic fonts, as they will not save memory for me.
I see that font textures are defined with 800x600, but these are not power of two textures. I think modern cards do not care, but older ones do so they will use 1024x1024 instead. Why 800x600?
Thank you.
scriptkid wrote:Hi,
Ogre and CEGUI will create their own texture, since both simply don't know about each other in that area.
I see, I thought that given that there is a CEGUIRenderer in ogre it also handles fonts. But if I use a texture for an imageset and the same texture for an overlay, would it be loaded twice?
Rackle wrote:You should have a look at these:
http://www.cegui.org.uk/wiki/index.php/GameChatBox
http://www.cegui.org.uk/wiki/index.php/DynamicFont
I see, my understanding is that using this cod for dynamic font results in the same memory consumption as if I'd use font file. If I only need two font sizes, both of which are constantly used in the menu then there is no real need to use dynamic fonts, as they will not save memory for me.
I see that font textures are defined with 800x600, but these are not power of two textures. I think modern cards do not care, but older ones do so they will use 1024x1024 instead. Why 800x600?
Thank you.
Regards, Alexander. http://sjcomp.com
Who is online
Users browsing this forum: No registered users and 10 guests