void oglFontBitmapDisplayList::CreateInternal(HDC hDC, oglFontDescriptor &_fontDesc){ // Create spot for the font metrics to be placed int count = lastChar - firstChar + 1; fontMetrics = new GLYPHMETRICS[count]; memset(fontMetrics, 0, sizeof(GLYPHMETRICS) * count); // Create identity matrix MAT2 mat; memset(&mat, 0, sizeof(mat)); mat.eM11.value = 1; mat.eM22.value = 1; // Get font metrics for each font for( int i = 0; i < count; i++ ) GetGlyphOutline( hDC, i + firstChar, GGO_METRICS, &fontMetrics[i], 0, NULL, &mat ); fontCreated = (wglUseFontBitmaps(hDC, firstChar, lastChar, listBase) == TRUE); if (!fontCreated) { std::string s = strFormat("oglFontDisplayListBase::Create error %ld\n", GetLastError()); OutputDebugStr(s.c_str()); }}
- onebeer