font generation

hey,
I would like to create a custom font for my game.
I use orxfontgen(from a rather revent SVN checkout) with the following parameters:
orxfontgen.exe -f Komika_display.ttf -t characters.txt -s 64 -o custom_font
I attached the generated font image as a PNG.
It looks like all characters are shifted a bit to the left.
the left column of characters is cropped. If I use this font some parts of other characters might be displayed inside the area of one character.

am I doing something wrong, or is this a bug?

as always it's a windows 7 machine. https://forum.orx-project.org/uploads/legacy/fbfiles/files/custom_font.zip

Comments

  • edited December 2010
    attached you will find a screenshot of the created font in use: font_in_use.png
  • edited December 2010
    the orxfontgen supplied with orx_1.2 will not even run because of the attached error. error-532a683a341d4f886aba98edc1cf56bf.png
  • edited December 2010
    The svn version needs probably to be updated to the latest version of liborx (+include files).
    That being said I wouldn't expect it to solve this issue as this looks more like some kind of striding issue. Probably wrong values sent to FreeType2.

    Can you send me the .ttf you're using so I can try on my side?
  • edited December 2010
    I'm sorry I totall forgot to reference the ttf file.
    I'm using some fonts from fontsquirrel.com. like this one:
    http://www.fontsquirrel.com/fonts/Komika-Display
  • edited December 2010
    Yeah I actually found the font using the name you provided but it wasn't quite the same as the screenshot you posted.

    So here we go, there was a bug but it's also because this kind of font wasn't (and will never totally be) supported.

    Let me explain: this specific font allows character overlap. To do so they define a negative Left Side Bearing (aka BearingX or LSB).

    That part wasn't supported in the generator.

    Now it'll give a visually correct result (no more parts cut on the left) but you will still not be able to write with overlap as you would achieve by doing it in a text editor using that font. Orx only truely supports monospaced fonts for now: that means fonts with variable character width *or* overlapping characters won't be 100% visually accurate when used in orx.

    Hope it's still fine with you and you can sync the svn (v2114) to get the latest version of the font generator. =)
  • edited December 2010
    ok thanks for your help. I guess I will be using a monospaced font.

    I just saw that you are giving a heads-up about this in the orxTEXT section of the wiki.
    maybe a notice at the --font parameter of orxfontgen would also be good.
  • edited December 2010
    Good suggestion. I'll add it right away!
Sign In or Register to comment.