On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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 11 days ago Views: 25
Viewing posts 1 to 1

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);