XOffset aligment

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

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

XOffset aligment

Postby masch » Mon Jul 13, 2009 13:37

Hi,

I created a StaticText. Within it, I put some text obtained from a custom font. When i cutting the letters from the sources, i put the XOffset = -10. When the StaticText renderizes the font, the first font of all it's showing clipped -in other cases it's showing not centered- (due to XOffset). How can i work around this problem?

Thanks

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

Re: XOffset aligment

Postby CrazyEddie » Tue Jul 14, 2009 08:28

Well the obvious solution is to not set the images XOffset values to -10, but I'm guessing there must be some reason why you need the XOffset of the images to be set to -10?

CE.

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Re: XOffset aligment

Postby masch » Tue Jul 14, 2009 12:16

Hi,

Yes I need the fonts are overlapped to achieve the effect I want to give. These fons have a glow, and I do not want to be space between them.

thx

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

Re: XOffset aligment

Postby CrazyEddie » Tue Jul 14, 2009 18:26

You might want to investigate the attribute 'HorzAdvance' which is used in the Font <Mapping> element to specify the amount to move the 'pen' before drawing the next glyph.

If you are already using the HorzAdvance, and are trying to combine it with the XOffset in the Imageset, the only thing I can suggest is to prefix a couple of spaces to the string before you set it to the StaticText (yeah, that's a bit of a hack).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests