Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Silver, a font for games

A free* pixel font for Latin, Chinese, Korean, Japanese, Cherokee, Runic, Cyrillic, and other character sets. · By Poppy Works

Very weird vertical alignment in GameMaker

A topic by Spooky Squid Games created Jun 19, 2024 Views: 234 Replies: 1
Viewing posts 1 to 2

I'm getting very weird vertical alignment when using Silver in GameMaker.  Attaching an image showing three single line strings all drawn in the same spot (the red dot) with different valign settings. The vertical alignment differences are so extreme that it appears as though they are on entirely different lines. 

My guess is something is wrong with the internal font formatting in Silver that's causing this since it doesn't happen with other fonts (at least nothing this extreme!).  

I have a solution that fixes this issue using the Scribble text rendering library, but wondering if there's any way to fix it for native GameMaker text rendering as well.  Anyone know if there is some way to change the font settings in GameMaker or a special import method so it doesn't do this?

For anyone else using Scribble this is my current fix, which aligns everything to the edges of the capitalized roman characters. Depending on how you're approaching localization, slightly different settings may make sense and you may want to swap these settings when changing languages. Note that this will only fix the issue when rendering text using Scribble functions not for any native text rendering.

scribble_font_set_halign_offset("fnt_silver",fa_center,1);
scribble_font_set_halign_offset("fnt_silver",fa_right,2);
scribble_font_set_halign_offset("fnt_silver",fa_left,0);
scribble_font_set_valign_offset("fnt_silver",fa_top,-2);
scribble_font_set_valign_offset("fnt_silver",fa_middle,1);
scribble_font_set_valign_offset("fnt_silver",fa_bottom,5);

I am not sure if it's related or what you are talking about, but I have noticed a very slight vertical offset (towards the top) of the font in general. This can get very apparent on bigger font sizes. I use Bevy not GameMaker, so I am not sure how much this is a game engine specific issue.