| 19 | static void __cdecl font_table_cleanup(void); |
| 20 | |
| 21 | HFONT |
| 22 | mswin_create_splashfont(HWND hWnd) |
| 23 | { |
| 24 | HDC hdc = GetDC(hWnd); |
| 25 | double scale = win10_monitor_scale(hWnd); |
| 26 | LOGFONT lgfnt; |
| 27 | ZeroMemory(&lgfnt, sizeof(lgfnt)); |
| 28 | lgfnt.lfHeight = -(int)(80 * scale); // height of font |
| 29 | lgfnt.lfWidth = 0; // average character width |
| 30 | lgfnt.lfEscapement = 0; // angle of escapement |
| 31 | lgfnt.lfOrientation = 0; // base-line orientation angle |
| 32 | lgfnt.lfWeight = FW_BOLD; // font weight |
| 33 | lgfnt.lfItalic = FALSE; // italic attribute option |
| 34 | lgfnt.lfUnderline = FALSE; // underline attribute option |
| 35 | lgfnt.lfStrikeOut = FALSE; // strikeout attribute option |
| 36 | lgfnt.lfCharSet = ANSI_CHARSET; // character set identifier |
| 37 | lgfnt.lfOutPrecision = OUT_DEFAULT_PRECIS; // output precision |
| 38 | lgfnt.lfClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision |
| 39 | lgfnt.lfQuality = DEFAULT_QUALITY; // output quality |
| 40 | lgfnt.lfPitchAndFamily = DEFAULT_PITCH; // pitch and family |
| 41 | NH_A2W("Times New Roman", lgfnt.lfFaceName, LF_FACESIZE); |
| 42 | HFONT font = CreateFontIndirect(&lgfnt); |
| 43 | ReleaseDC(hWnd, hdc); |
| 44 | |
| 45 | return font; |
| 46 | } |
| 47 | |
| 48 | BOOL |
| 49 | mswin_font_supports_unicode(HFONT hFont) |
no test coverage detected