Results 1 to 5 of 5

Thread: [JEDI-SDL] (SFont) font generator ?

  1. #1

    [JEDI-SDL] (SFont) font generator ?

    I don't found ;/

    How can i generate de fonts ?
    From brazil (:

    Pascal pownz!

  2. #2

    [JEDI-SDL] (SFont) font generator ?

    :?:
    From brazil (:

    Pascal pownz!

  3. #3

    [JEDI-SDL] (SFont) font generator ?

    I'm no SDL expert so i can only explain it generally.

    This is how you usually generate a font:

    > Create a texture/image
    > Select a font
    > Determine the size for each character in pixels on the image
    > Draw all needed characters onto the image
    > Make an array of Rectangles that contain the rectangles for each letter.

    So when you want to render a text, you have to find the required charecter-rectangles.
    Then cut them out of the image and render them in the right order.

    You can also look for FontStudio (Nitrogen has made it). It's a nice tool to make bitmap-fonts.
    This makes the whole thing alot easier. There are headers which have routines to read the needed rectangle information and render the font. You might like to take a look at those.

    If you only need a basic font, there should be other way's to render them. You shouldn't waste time on this when you only want someting simple.

    Hope this helps

    Edit: You might want to take a look at this (it's not pascal i know... but it might help you)

    http://gpwiki.org/index.php/SDL_ttf
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  4. #4

    [JEDI-SDL] (SFont) font generator ?

    Quote Originally Posted by chronozphere
    I'm no SDL expert so i can only explain it generally.

    This is how you usually generate a font:

    > Create a texture/image
    > Select a font
    > Determine the size for each character in pixels on the image
    > Draw all needed characters onto the image
    > Make an array of Rectangles that contain the rectangles for each letter.

    So when you want to render a text, you have to find the required charecter-rectangles.
    Then cut them out of the image and render them in the right order.

    You can also look for FontStudio (Nitrogen has made it). It's a nice tool to make bitmap-fonts.
    This makes the whole thing alot easier. There are headers which have routines to read the needed rectangle information and render the font. You might like to take a look at those.

    If you only need a basic font, there should be other way's to render them. You shouldn't waste time on this when you only want someting simple.

    Hope this helps

    Edit: You might want to take a look at this (it's not pascal i know... but it might help you)

    http://gpwiki.org/index.php/SDL_ttf
    But i need a generator for SDL_Font ;/
    From brazil (:

    Pascal pownz!

  5. #5

    [JEDI-SDL] (SFont) font generator ?

    Forget...
    I used FontToll, generated the bmp and XNA-XML
    That i created my own parser and adapted XNA-XML to it =]
    From brazil (:

    Pascal pownz!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •