gdi32: Added GetGlyphOutlineW tests on glyph that contains empty contour.
This commit is contained in:
parent
b696558f04
commit
4f07c49547
@ -4277,6 +4277,46 @@ static BOOL write_ttf_file(const char *fontname, char *tmp_name)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_GetGlyphOutline_empty_contour(void)
|
||||||
|
{
|
||||||
|
HDC hdc;
|
||||||
|
LOGFONTA lf;
|
||||||
|
HFONT hfont, hfont_prev;
|
||||||
|
TTPOLYGONHEADER *header;
|
||||||
|
GLYPHMETRICS gm;
|
||||||
|
char buf[1024];
|
||||||
|
DWORD ret;
|
||||||
|
|
||||||
|
memset(&lf, 0, sizeof(lf));
|
||||||
|
lf.lfHeight = 72;
|
||||||
|
lstrcpyA(lf.lfFaceName, "wine_test");
|
||||||
|
|
||||||
|
hfont = CreateFontIndirectA(&lf);
|
||||||
|
ok(hfont != 0, "CreateFontIndirectA error %u\n", GetLastError());
|
||||||
|
|
||||||
|
hdc = GetDC(NULL);
|
||||||
|
|
||||||
|
hfont_prev = SelectObject(hdc, hfont);
|
||||||
|
ok(hfont_prev != NULL, "SelectObject failed\n");
|
||||||
|
|
||||||
|
ret = GetGlyphOutlineW(hdc, 0xa8, GGO_NATIVE, &gm, 0, NULL, &mat);
|
||||||
|
ok(ret == 228, "GetGlyphOutline returned %d, expected 228\n", ret);
|
||||||
|
|
||||||
|
header = (TTPOLYGONHEADER*)buf;
|
||||||
|
ret = GetGlyphOutlineW(hdc, 0xa8, GGO_NATIVE, &gm, sizeof(buf), buf, &mat);
|
||||||
|
ok(ret == 228, "GetGlyphOutline returned %d, expected 228\n", ret);
|
||||||
|
ok(header->cb == 36, "header->cb = %d, expected 36\n", header->cb);
|
||||||
|
ok(header->dwType == TT_POLYGON_TYPE, "header->dwType = %d, expected TT_POLYGON_TYPE\n", header->dwType);
|
||||||
|
header = (TTPOLYGONHEADER*)((char*)header+header->cb);
|
||||||
|
ok(header->cb == 96, "header->cb = %d, expected 96\n", header->cb);
|
||||||
|
header = (TTPOLYGONHEADER*)((char*)header+header->cb);
|
||||||
|
ok(header->cb == 96, "header->cb = %d, expected 96\n", header->cb);
|
||||||
|
|
||||||
|
SelectObject(hdc, hfont_prev);
|
||||||
|
DeleteObject(hfont);
|
||||||
|
ReleaseDC(NULL, hdc);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_CreateScalableFontResource(void)
|
static void test_CreateScalableFontResource(void)
|
||||||
{
|
{
|
||||||
char ttf_name[MAX_PATH];
|
char ttf_name[MAX_PATH];
|
||||||
@ -4358,6 +4398,8 @@ todo_wine
|
|||||||
ret = is_truetype_font_installed("wine_test");
|
ret = is_truetype_font_installed("wine_test");
|
||||||
ok(ret, "font wine_test should be enumerated\n");
|
ok(ret, "font wine_test should be enumerated\n");
|
||||||
|
|
||||||
|
test_GetGlyphOutline_empty_contour();
|
||||||
|
|
||||||
ret = pRemoveFontResourceExA(fot_name, FR_PRIVATE, 0);
|
ret = pRemoveFontResourceExA(fot_name, FR_PRIVATE, 0);
|
||||||
todo_wine
|
todo_wine
|
||||||
ok(!ret, "RemoveFontResourceEx() with not matching flags should fail\n");
|
ok(!ret, "RemoveFontResourceEx() with not matching flags should fail\n");
|
||||||
|
@ -20,7 +20,7 @@ OS2Version: 2
|
|||||||
OS2_WeightWidthSlopeOnly: 0
|
OS2_WeightWidthSlopeOnly: 0
|
||||||
OS2_UseTypoMetrics: 1
|
OS2_UseTypoMetrics: 1
|
||||||
CreationTime: 1288336343
|
CreationTime: 1288336343
|
||||||
ModificationTime: 1288336873
|
ModificationTime: 1352483620
|
||||||
PfmFamily: 17
|
PfmFamily: 17
|
||||||
TTFWeight: 500
|
TTFWeight: 500
|
||||||
TTFWidth: 5
|
TTFWidth: 5
|
||||||
@ -86,7 +86,7 @@ DisplaySize: -24
|
|||||||
AntiAlias: 1
|
AntiAlias: 1
|
||||||
FitToEm: 1
|
FitToEm: 1
|
||||||
WinInfo: 65 65 19
|
WinInfo: 65 65 19
|
||||||
BeginChars: 65539 4
|
BeginChars: 65539 5
|
||||||
|
|
||||||
StartChar: .notdef
|
StartChar: .notdef
|
||||||
Encoding: 65536 -1 0
|
Encoding: 65536 -1 0
|
||||||
@ -176,5 +176,30 @@ Width: 0
|
|||||||
Flags: W
|
Flags: W
|
||||||
LayerCount: 2
|
LayerCount: 2
|
||||||
EndChar
|
EndChar
|
||||||
|
|
||||||
|
StartChar: dieresis
|
||||||
|
Encoding: 168 168 0
|
||||||
|
Width: 1000
|
||||||
|
VWidth: 0
|
||||||
|
Flags: HW
|
||||||
|
LayerCount: 2
|
||||||
|
Fore
|
||||||
|
SplineSet
|
||||||
|
620.215 824.429 m 1,0,1
|
||||||
|
760.84 777.554 760.84 777.554 713.965 636.929 c 1,2,-1
|
||||||
|
620.215 824.429 l 1,0,1
|
||||||
|
154.883 324.971 m 0,3,-1
|
||||||
|
254.492 773.213 m 1,4,5
|
||||||
|
310.707 834.805 310.707 834.805 374.609 767.354 c 1,6,7
|
||||||
|
410.471 728.672 410.471 728.672 374.609 691.182 c 0,8,9
|
||||||
|
308.375 621.934 308.375 621.934 254.492 688.252 c 0,10,11
|
||||||
|
216.406 735.127 216.406 735.127 254.492 773.213 c 1,4,5
|
||||||
|
254.492 773.213 m 1,12,13
|
||||||
|
216.406 735.127 216.406 735.127 254.492 688.252 c 0,14,15
|
||||||
|
308.375 621.934 308.375 621.934 374.609 691.182 c 0,16,17
|
||||||
|
410.471 728.672 410.471 728.672 374.609 767.354 c 1,18,19
|
||||||
|
310.707 834.805 310.707 834.805 254.492 773.213 c 1,12,13
|
||||||
|
EndSplineSet
|
||||||
|
EndChar
|
||||||
EndChars
|
EndChars
|
||||||
EndSplineFont
|
EndSplineFont
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user