Graphics Sprite font creator for GMS 1.x and 2.x

Discussion in 'Game Design, Development And Publishing' started by gnysek, Feb 10, 2017.

  1. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,305
    Since not all fonts are rendered nicely in GMS, and I wanted to add special effects to them like shadow, stroke and gradients (in Photoshop), I've came with idea to creating a HTML5 app, which will render text on canvas and allow to save it as image, and then use in GMS as "load from strip" which can be later used to load font from sprite ingame.

    So, here it is: https://gnysek.github.io/gms-font-creator/

    It's a first version, so it's not yet perfect - but you can easily participate and extend this tool, as I'm hosting it on github! https://github.com/gnysek/gms-font-creator

    gms-font-creator.png

    Things that could be improved:
    - changing color style
    - automatic cropping/resize of canvas, since for now some pixels on right are empty
    - more effects
    - sliders for values
    - google font loading, so you don't need to have them on disk
    - predefined character sets for various languages (currenty it's Polish, but you can easily remove letters you don't need - they are after € sign :)

    Hope you like it!
     
    Rob, Mick, Shirsh and 4 others like this.
  2. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,351
    Oh, this is rad. I've approached this same problem in a different way last year and wrote a converter for BMFont format (mostly to avoid having to do glyph packing). Littera has some nice ideas on the subject too, though it would seem like it's hard to make "effects" functionality truly flexible.
     
  3. Lukan

    Lukan Gay Wizard Freak

    Joined:
    Jun 20, 2016
    Posts:
    384
    I love you, oh my gods.
     
    gnysek likes this.
  4. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,305
    The problem is that most of tools which have this functionality, are not compatible with Game Maker (but in fact GMS IDE export fonts in those formats, what's fun). That's why I came with this idea, case for all tools I found in web, there was a problem with importing it to GMS. Previously I was using older GM to create a surface and draw text there, then save to file as strip, but I encountered a problem, where "P, B, D" letters are cut from right in one of fonts (Roboto), so they were looking ugly. Since fonts are nicely rendered in browsers, I came with idea of drawing on canvas and converting it to image - after a quick google that it's possible, I've changed idea to solution and two hours later it was ready :)
     
  5. Lukan

    Lukan Gay Wizard Freak

    Joined:
    Jun 20, 2016
    Posts:
    384
    Could I request an anti-aliasing option?
    I'm trying to render pixel fonts, and they blur a bit with the aa on
     
    Wayfarer likes this.
  6. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,305
    @Lukan: Can you show a screen with what's wrong?
     
  7. Lukan

    Lukan Gay Wizard Freak

    Joined:
    Jun 20, 2016
    Posts:
    384
    Nothing is wrong per se, but my pixel fonts end up having blurry transparencies.
    I was hoping they'd come out solid, but they look like this: [​IMG]
     
  8. Pineapple Lake

    Pineapple Lake Member

    Joined:
    Aug 25, 2016
    Posts:
    87
    Hi Gnysek,

    I really like your font builder, it's great and easy to use!
    Is it possible to add an option to turn off anti-aliasing?
     
  9. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,305
    Seems that HTML5 CANVAS doesn't allow it :/ Already searched on stackoverflow for several hours.
     
  10. Pineapple Lake

    Pineapple Lake Member

    Joined:
    Aug 25, 2016
    Posts:
    87
    That's too bad, but thanks for trying!

    I've tried using CBFG but the texture page created has all characters aligned to the left.
    I've tried using BMfont but the texture page created has different cell widths for the characters
    ..making importing in GMS 2 as a strip very complicated.

    I'll try to create a texture strip manually
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice