March 23, 2026
10:08 a.m.
On Mon Mar 23 10:08:19 2026 +0000, Maotong Zhang wrote:
Yes. For non TT fonts, rotation usually doesn’t work. I tried drawing vertical text using the System font, which is a bitmap font on Windows. The text is drawn vertically. So maybe we should fix CreateFontIndirectA() or ExtTextOutW() instead.
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc;
RECT rect;
LOGFONTA logfont = { 0 };
HFONT old_font, font2;
hdc = wParam ? (HDC)wParam : BeginPaint( hwnd, &ps );
logfont.lfEscapement = 900;
logfont.lfOrientation = 900;
logfont.lfHeight = -12;
logfont.lfWeight = FW_NORMAL;
strcpy(logfont.lfFaceName, "System");
font2 = CreateFontIndirectA(&logfont);
SetRect(&rect, 50, 50, 100, 100);
old_font = SelectObject(hdc, font2);
ExtTextOutW(hdc, 50, 50, ETO_OPAQUE, &rect, L"12345", 5, 0);
SelectObject(hdc, old_font);
DeleteObject(font2);
if ( !wParam ) EndPaint( hwnd, &ps );
return 0;
}
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/10358#note_133350