#pragma once // Shim for the subset the 40250 font path uses (EterLib/GrpDIB, GrpFontTexture, Util). // The calls are implemented by the platform layer over FreeType (platform/Win32Gdi.cpp): one DIB // per memory DC, glyphs rendered the way GDI lays out a TrueType face for a LOGFONT cell height. #include "../../Win32Types.h" typedef DWORD COLORREF; typedef void* HGDIOBJ; #define RGB(r, g, b) ((COLORREF)(((BYTE)(r) | ((WORD)((BYTE)(g)) << 8)) | (((DWORD)(BYTE)(b)) << 16))) typedef struct _ABCFLOAT { FLOAT abcfA; FLOAT abcfB; FLOAT abcfC; } ABCFLOAT, *LPABCFLOAT; #define TRANSPARENT 1 #define OPAQUE 2 #define FW_NORMAL 400 #define FW_BOLD 700 #define OUT_DEFAULT_PRECIS 0 #define CLIP_DEFAULT_PRECIS 0 #define DEFAULT_QUALITY 0 #define NONANTIALIASED_QUALITY 3 #define ANTIALIASED_QUALITY 4 #define DEFAULT_PITCH 0 #define ANSI_CHARSET 0 #define DEFAULT_CHARSET 1 #define SHIFTJIS_CHARSET 128 #define HANGUL_CHARSET 129 #define GB2312_CHARSET 134 #define CHINESEBIG5_CHARSET 136 #define GREEK_CHARSET 161 #define TURKISH_CHARSET 162 #define VIETNAMESE_CHARSET 163 #define HEBREW_CHARSET 177 #define ARABIC_CHARSET 178 #define BALTIC_CHARSET 186 #define RUSSIAN_CHARSET 204 #define THAI_CHARSET 222 #define EASTEUROPE_CHARSET 238 #define BI_RGB 0L #define DIB_RGB_COLORS 0 HDC CreateCompatibleDC(HDC hdc); BOOL DeleteDC(HDC hdc); HBITMAP CreateDIBSection(HDC hdc, const BITMAPINFO* pbmi, UINT usage, void** ppvBits, HANDLE hSection, DWORD offset); int SetDIBitsToDevice(HDC hdc, int xDest, int yDest, DWORD w, DWORD h, int xSrc, int ySrc, UINT StartScan, UINT cLines, const void* lpvBits, const BITMAPINFO* lpbmi, UINT ColorUse); HFONT CreateFontIndirect(const LOGFONT* lplf); BOOL DeleteObject(HGDIOBJ ho); HGDIOBJ SelectObject(HDC hdc, HGDIOBJ h); COLORREF SetTextColor(HDC hdc, COLORREF color); COLORREF SetBkColor(HDC hdc, COLORREF color); int SetBkMode(HDC hdc, int mode); BOOL GetTextExtentPoint32W(HDC hdc, LPCWSTR lpString, int c, LPSIZE psizl); BOOL GetCharABCWidthsFloatW(HDC hdc, UINT iFirst, UINT iLast, LPABCFLOAT lpABC); BOOL TextOutW(HDC hdc, int x, int y, LPCWSTR lpString, int c); BOOL TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c); #define TextOut TextOutA