I did some more testing with this and found more strangeness with this particular font.  Below I mentioned that attempting to size "MS Sans Serif" to 10pts at 96dpi resulted in an error being set (Invalid_Pixel_Size).

I tried using 8pts instead.  With 8pts, no error code is set when calling FaceSize, however, when rendering the font, all I get is garbage on the screen.

Any idea whats going on with "MS Sans Serif"?

On 1/27/2010 10:51 AM, Dave Calkins wrote:
I'm using FreeTypeGL on Windows 7.  It seems to be working fine for a number of fonts.  I tried using "MS Sans Serif" and there appear to be problems.

This face name maps to the "C:\Windows\Fonts\SSERIFE.FON" font file.  I'm calling the below to load the font.

FTFont* pFont = new FTTextureFont(fontFile);

After the above, pFont->Error() == 0.

I then get the output device resolution with the below which turns out to be 96dpi.

int resY = pMainWndDC->GetDeviceCaps(LOGPIXELSY);

I then attempt to size the font with the below call.  I'm calling this with pointSize == 10, though the problem happens for other points sizes as well.

pFont->FaceSize(pointSize,resY);

After calling FaceSize, pFont->Error() == 0x17 which is defined as the below in fterrdef.h.

  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17, \
                "invalid pixel size" )

Any idea what the problem is with this font?  I'm able to use it in WordPad, for example, at 10 points on the same output device (96dpi) with no problems.

------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________ Ftgl-devel mailing list Ftgl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ftgl-devel