Unable to assign font glyph to null character (U+0000)

Using the U+XXXX format to assign the glyphs in the FNT file, I've noticed that assigning U+0000 doesn't work regularly. It gets ignored, causing a shift to every other character to be assigned to its previous symbol in the list: code 1 gets the 0th glyph, code 2 gets the 1st, and so on.

Is that intentional? I've been working on the Windows SDK. Here's the project I've been using to test the font:

source.zip (8.5 KB)

So far, I've avoided this issue by replacing U+0000 with U+2400, its control picture code.

It might be that the null character is hardcoded not to have a glyph, since in C that character serves as an end-of-string marker.

1 Like

That's true, though it creates an inconsistency with the line feed character. Both can't be printed using the drawText() methods, but \n can have a glyph assigned to it.

By the way, thank you for your help in my posts so far.