   [HAAF's Game Engine] - GetStringWidth() Issues
  Hi, has anyone here tried the GetStringWidth() function which is a member of the hgeFont class? It's supposed to return the pixel width of the string you pass to it, but for me it's always off by too many pixels to actually use. I've tried numerous strings but their pixel values are always off by some fraction of their actual length. This is really bothering me because it forces me to hard-code the values for my menus based on their on-screen locations, instead of calculating the offsets in real time. If anyone knows how to fix it or what I'm doing wrong it would be extremely useful.Here's an example:hgeFont *_font = new hgeFont("media\\fonts\\Centaur.fnt"); // Works fineint width = _font->GetStringWidth("New Campaign");// returns the value 91, actual pixel on-screen value is 104.// Also note that rendering AND _font->GetHeight() work fine! So it must be// API specific to GetStringWidth().[Edited by - orphankill on May 11, 2009 11:59:39 PM]