Argh, it seems like invalid fonts pop up every so often...
Attached is a font that I'm getting an GDERR_INVALIDBITMAP error for. Here's the loading code, nothing unusual:
It fails on the CreateFont call, CreateSurface is fine. I plugged the font into the Simple sample app, and it displays the text as gibberish (no error checking during font loading, so it's getting loaded but then not displaying properly).
Anyone see the problem? The font was created with FontMaker by the way. Thanks!
Attached is a font that I'm getting an GDERR_INVALIDBITMAP error for. Here's the loading code, nothing unusual:
- Code:
if (FAILED(pFont1.CreateSurface(NULL, hInstance, IDF_VERDANA_10_BOLD_BLACK, TEXT("FONTS")))) {
MessageBox(NULL, TEXT("pFont1.CreateSurface() Failed"), TEXT("Error"), MB_OK);
}
if (FAILED(hr = pFont1.CreateFont(NULL, RGB(255, 128, 255), NULL, NULL))) {
if (hr == GDERR_INVALIDBITMAP) { MessageBox(NULL, TEXT("pFont1.CreateFont() Failed"), TEXT("GDERR_INVALIDBITMAP"), MB_OK); }
if (hr == GDERR_OUTOFMEMORY) { MessageBox(NULL, TEXT("pFont1.CreateFont() Failed"), TEXT("GDERR_OUTOFMEMORY"), MB_OK); }
if (hr == GDERR_SURFACELOST) { MessageBox(NULL, TEXT("pFont1.CreateFont() Failed"), TEXT("GDERR_SURFACELOST"), MB_OK); }
}
It fails on the CreateFont call, CreateSurface is fine. I plugged the font into the Simple sample app, and it displays the text as gibberish (no error checking during font loading, so it's getting loaded but then not displaying properly).
Anyone see the problem? The font was created with FontMaker by the way. Thanks!
Attachments:
