Font structure ignoring TextureCorner

It appears that TextureCorner is being ignored by the font structure.

In my font sheet, I had an 18 pixel gap on the left hand side of the sheet which meant all letters were slightly offset.

Doing:

TextureCorner = (18, 0, 0)

...made no difference so I simply cropped off the left 18 pixels in gimp and all was well.

So this is easily solved, but just reporting this as TextureCorner is listed as available at:

http://orx-project.org/wiki/en/orx/config/settings_structure/orxtext

Comments

  • edited January 2016
    I think it's a typo in the wiki, there's no property called TextureCorner for fonts. When looking at CreationTemplate.ini, we have:
    [FontTemplate]
    Texture = path/to/ImageFile.ext;
    TextureOrigin = [Vector]; NB: Top left corner, z is ignored; Defaults to (0, 0, 0);
    TextureSize = [Vector]; NB: Texture size for the character definition area, z is ignored; Defaults to texture's width & height;
    CharacterList = "ordered list of character"; NB: All characters with a glyph in the texture file have to be specified in order of appearance; Supports ANSI or UTF-8 strings (*NOT* ISO-Latin-1!)
    CharacterSize = [Vector]; NB: If defined, CharacterHeight & CharacterWidthList will be ignored. z value is ignored;
    CharacterHeight = [Float]; NB: This is only used for non-monospaced fonts, ie. when CharacterSize isn't defined;
    CharacterWidthList = [Float] # [Float] # ...; NB: This is only used for non-monospaced fonts, ie. when CharacterSize isn't defined. There should be exactly one value per character defined in CharacterList;
    CharacterSpacing = [Vector]; NB: Empty space between characters, z is ignored. Defaults to (0, 0, 0);
    

    Be it for fonts or graphics, TextureOrigin should always be the property used.
  • edited January 2016
    Mmh, after checking, even if TextureOrigin is the way to go, TextureCorner is still silently supported. Do you have a TextureSize defined as well?
    You need both properties for them to be used.
  • edited January 2016
    Ah no I didn't supply TextureSize . I assumed it would calculate automatically. But that's fine, I'll add a note in the wiki.

    So should the wiki comply with the creationtemplate.ini and be called TextureOrigin?

    I'll correct it if so.
  • edited January 2016
    If you don't mind, that'd be great. TextureCorner shouldn't be used anywhere at that point.
  • edited January 2016
    All done.
  • edited January 2016
    Thanks!
Sign In or Register to comment.