http://bugs.winehq.org/show_bug.cgi?id=58677
Bug ID: 58677 Summary: GetGlyphOutlineW returns wrong values Product: Wine Version: 10.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: kyle.kcsoftwares@gmail.com Distribution: ---
GetGlyphOutlineW returns wrong values
Test program :
#include <windows.h> #include <cstdio> using namespace std;
int main(void) { LOGFONT lf; ZeroMemory(&lf, sizeof(lf)); lf.lfHeight = -14; lf.lfCharSet = DEFAULT_CHARSET; lstrcpy(lf.lfFaceName, TEXT("Tahoma")); if (HFONT hFont = CreateFontIndirect(&lf)) { if (HDC hDC = CreateCompatibleDC(NULL)) { HGDIOBJ hFontOld = SelectObject(hDC, hFont); { MAT2 mat2;
mat2.eM11.fract = 0; mat2.eM12.fract = 0; mat2.eM21.fract = 0; mat2.eM22.fract = 0;
mat2.eM11.value = 1; mat2.eM12.value = 0; mat2.eM21.value = 0; mat2.eM22.value = 1;
GLYPHMETRICS gm; DWORD dwRet = GetGlyphOutlineW(hDC, L'A', GGO_METRICS, &gm, 0, NULL, &mat2); printf("dwRet: 0x%lX, GetLastError(): %ld\n", dwRet, GetLastError()); printf("gmBlackBoxX: %u\n", gm.gmBlackBoxX); printf("gmBlackBoxY: %u\n", gm.gmBlackBoxY); printf("gmptGlyphOrigin.x: %ld\n", gm.gmptGlyphOrigin.x); printf("gmptGlyphOrigin.y: %ld\n", gm.gmptGlyphOrigin.y); printf("gmCellIncX: %d\n", gm.gmCellIncX); printf("gmCellIncY: %d\n", gm.gmCellIncY); } SelectObject(hDC, hFontOld); DeleteDC(hDC); } DeleteObject(hFont); } return 0; }