What happened to character spacings from glyphs in FNT_NEW recently??

Started by square, August 24, 2011, 06:56:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

square

In past revisions of Bennu I'd not had a problem with VARIABLE_WIDTH character spacings, until I recently downloaded the new revision of BennuGD. Running my code on this, I noticed right away the change.

After all, fonts used at fairly low resolutions need the extra pixel width to space out the characters! Imagine the problems with "monotype" fonts!

Can there be a flag for this extra pixel in future versions of FNT_NEW, or at least some solution?

Why was this changed?

This explains exactly how to reinstate the old effect of FNT_NEW (untested code!)

int g,glyph,newglyph;
for(g=0; g<256; ++g)
glyph = get_glyph(font,g);
newglyph = map_new(graphic_info(0,glyph,G_WIDTH)+1,graphic_info(0,glyph,G_HEIGHT),graphic_info(0,glyph,G_DEPTH));
map_clear(0,newglyph,0);
set_center(0,glyph,0,0);
map_put(0,glyph,newglyph,0,0);
set_glyph(font,newglyph);
end
Square-theorist.

handsource-dyko

I noticed the same thing too. The change was made to make some new features possible, but I worked my was around this by changing my program, and basically using another font then the system font.

square

Of course new features are great. I almost understand the change myself, having given this some thought before my posting.

Only people should not have to "workaround" problems faced with simply using a monotype variable-width font in their game.

The characters in this case would be merged together. My mode of thinking is certainly that the glyph represents characters with at least 1 pixel of space between them.

Can variable-width not accommodate this pixel-gap between graphical data?
Square-theorist.