void Schema::CreateTables() { CreateSourceFile(); CreateSourceRange(); CreateSourceLocation(); CreateNamespace(); CreateType(); }
void ProcessFont(HWND hWnd, std::wstring const& fontName, int weight, int size, DWORD italic) { HDC hDC = GetDC(hWnd); SetTextColor(hDC, RGB(0, 0, 0)); SetBkColor(hDC, RGB(255, 255, 255)); // Create the font. HFONT hFont = CreateFont(size, 0, 0, 0, weight, italic, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, fontName.c_str()); HGDIOBJ oldFont = SelectObject(hDC, hFont); RECT r; r.left = r.top = 0; r.right = gWindowWidth - 1; r.bottom = gWindowHeight - 1; FillRect(hDC, &r, nullptr); wchar_t msg[256]; wsprintf(msg, L"Rendering %s, weight = %d, size = %d, italics = %d", fontName.c_str(), weight, size, italic); TextOut(hDC, 8, 3*size, msg, (int)wcslen(msg)); int width, height; unsigned char* texels; float characterData[257]; CreateFontData(hDC, width, height, texels, characterData); CreateHeaderFile(fontName, weight, size, italic); CreateSourceFile(fontName, weight, size, italic, width, height, texels, characterData); delete[] texels; SelectObject(hDC, oldFont); DeleteObject(hFont); ReleaseDC(hWnd, hDC); }