The 2024 Wheel Reinvention Jam is in 16 days. September 23-29, 2024. More info

Day 173: Spaces 0 width

Somewhere around 35minutes in the width of spaces got changed to 0. You can see this most easily in the last line of text.

The HorizontalAdvance array was changed to be initialized to 0 and the advance calculation was moved into LoadGlyphBitmap().

But it was moved inside the "if (MinX <= MaxX)" check and for spaces all the pixels are black so MinX will be less than MaxX. So the HorizontalAdvance does not get updated.

Edited by Mike T on
Thanks for the catch! We fixed it on day 174 when someone (you?) who had read this post mentioned it on the stream.

- Casey
It was someone else, I was around but sadly I was working and only half there. I will watch the episode properly today. From what I caught of it there was slightly more to the fix than what I wrote.
No, I don't think so - the fix is exactly what you wrote (modulo the fact that you have to add space to the character set, too). But not having read the post, I didn't remember the Min/Max thing, so I thought the fix was just adding space to the character set. Then I was like "WTF???" and then looked at the glyph code and noticed the Min/Max thing and was like "oh right, space won't be processed still" and then moved the kerning stuff outside.

- Casey