I'm trying to draw a string to the screen using different fonts with different lengths.
wxScreenDC dc;
dc.SetFont(f.font);
f.height=dc.GetCharHeight();
f.width=dc.GetCharWidth();
This is the code I'm using, the height is always correct and drawn on the screen correctly.. However the width is some fonts drawn correctly in all font sizes (eg. Fixedsys ,Courier New) but in some fonts doesn't drawn correctly (calculated less then the actual display width) (eg. Arial)
I checked the docs and saw that
wxCoord wxDC::GetCharWidth () const
Gets the average character width of the currently set font.
"Gets the average character width.."
Can't i get the actual width of the font character?
If not, how can I calculate correctly the display width of the string?
Thanks.