getStringWidthFloat() possible bug?

I was rendering a String character to the screen and was wondering why when I created a box around it, with width set to the character's width, it was way larger than the actual displayed character.   so I took a screenshot of said character in my app, and it's only 28px wide, according to the image I captured via Command-Shift-4. 

Line 644 says:

return w * font->height * font->horizontalScale;  

my font height was 132, and w was 0.38366428.   horizontalScale was 1

so, getStringWidthFloat() was returning 50.6436844, instead of 28.  


The question I have is: Is this a bug, or is my font's actual width larger than what gets displayed on the screen, and that could be the source of the error? 

Interesting - that function should work for all standard fonts, as far as we know. Maybe you are using some funny font or some weird special character?

I was using this font:

Well, that's exactly what I would call a funny font ;-) for stuff like this, please don't rely on the return value of getStringWidthFloat() — who knows what's going in in that font...