330{
332 static const char long_text[] = "Example text to test clipping and other related things";
333 static const WCHAR long_textW[] =
L"Example text to test clipping and other related things";
334 static const MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} };
335 static const struct
336 {
338 unsigned int expected_size;
339 unsigned int expected_levels;
340 }
342 {
343 { 2, 32, 2 },
344 { 6, 128, 4 },
345 { 10, 256, 5 },
346 { 12, 256, 5 },
347 { 72, 256, 8 },
348 { 250, 256, 9 },
349 { 258, 512, 10 },
350 { 512, 512, 10 },
351 };
356 IDirect3DDevice9 *bufdev;
371
372
374 hr =
D3DXCreateFontA(
device, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Tahoma", &
font);
379
380 hr =
D3DXCreateFontA(
device, 0, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Tahoma", &
font);
383
384 hr =
D3DXCreateFontA(
device, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
NULL, &
font);
387
388 hr =
D3DXCreateFontA(
device, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"", &
font);
391
392 hr =
D3DXCreateFontA(
NULL, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Tahoma", &
font);
394
395 hr =
D3DXCreateFontA(
device, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Tahoma",
NULL);
397
398 hr =
D3DXCreateFontA(
NULL, 12, 0,
FW_DONTCARE, 0,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Tahoma",
NULL);
400
401
402
416
419
422
425
426
427
431
434
439
441
442
443
447
450
453
454 ok(
desc.Height == 12,
"Got unexpected height %d.\n",
desc.Height);
455 ok(
desc.Width == 8,
"Got unexpected width %u.\n",
desc.Width);
457 ok(
desc.MipLevels == 2,
"Got unexpected miplevels %u.\n",
desc.MipLevels);
458 ok(
desc.Italic ==
TRUE,
"Got unexpected italic %#x.\n",
desc.Italic);
464
466
467
468
472
474 ok(!!
hdc,
"Got unexpected hdc %p.\n",
hdc);
475
477 ok(
ret,
"Got unexpected ret %#x.\n",
ret);
479 ok(
ret,
"Got unexpected ret %#x.\n",
ret);
480
481 ok(
metrics.tmHeight == expmetrics.
tmHeight,
"Got unexpected height %d, expected %d.\n",
483 ok(
metrics.tmAscent == expmetrics.
tmAscent,
"Got unexpected ascent %d, expected %d.\n",
485 ok(
metrics.tmDescent == expmetrics.
tmDescent,
"Got unexpected descent %d, expected %d.\n",
491 ok(
metrics.tmAveCharWidth == expmetrics.
tmAveCharWidth,
"Got unexpected average char width %d, expected %d.\n",
493 ok(
metrics.tmMaxCharWidth == expmetrics.
tmMaxCharWidth,
"Got unexpected maximum char width %d, expected %d.\n",
495 ok(
metrics.tmWeight == expmetrics.
tmWeight,
"Got unexpected weight %d, expected %d.\n",
497 ok(
metrics.tmOverhang == expmetrics.
tmOverhang,
"Got unexpected overhang %d, expected %d.\n",
503 ok(
metrics.tmFirstChar == expmetrics.
tmFirstChar,
"Got unexpected first char %u, expected %u.\n",
505 ok(
metrics.tmLastChar == expmetrics.
tmLastChar,
"Got unexpected last char %u, expected %u.\n",
509 ok(
metrics.tmBreakChar == expmetrics.
tmBreakChar,
"Got unexpected break char %u, expected %u.\n",
511 ok(
metrics.tmItalic == expmetrics.
tmItalic,
"Got unexpected italic %u, expected %u.\n",
515 ok(
metrics.tmStruckOut == expmetrics.
tmStruckOut,
"Got unexpected struck out %u, expected %u.\n",
519 ok(
metrics.tmCharSet == expmetrics.
tmCharSet,
"Got unexpected charset %u, expected %u.\n",
521
523
524
525
529
542
555
557
558
559
563
565 ok(!!
hdc,
"Got unexpected hdc %p.\n",
hdc);
566
575
580
583
584 for (
c =
'b';
c <=
'z'; ++
c)
585 {
588
591
595 ok(
hr ==
D3D_OK,
"Character %c: got unexpected hr %#x.\n",
c,
hr);
597 ok(surf_desc.
Usage == 0,
"Character %c: got unexpected usage %#x.\n",
c, surf_desc.
Usage);
598 ok(surf_desc.
Width == 256,
"Character %c: got unexpected width %u.\n",
c, surf_desc.
Width);
599 ok(surf_desc.
Height == 256,
"Character %c: got unexpected height %u.\n",
c, surf_desc.
Height);
601
604
606 ok(
ret,
"Got unexpected ret %#x.\n",
ret);
607
612 ok(cellinc.
x == glyph_metrics.
gmptGlyphOrigin.
x - 1,
"Character %c: got %d, expected %d.\n",
614 ok(cellinc.
y ==
tm.tmAscent - glyph_metrics.
gmptGlyphOrigin.
y - 1,
"Character %c: got %d, expected %d.\n",
616
618 }
619
622
623
626
627
628 for (glyph = 1; glyph < 4; ++glyph)
629 {
630 texture = (IDirect3DTexture9 *)0xdeadbeef;
634 }
635
637
640 {
643 ok(
hr ==
D3D_OK,
"Test %u: got unexpected hr %#x.\n",
i,
hr);
644
646 ok(!!
hdc,
"Test %u: got unexpected hdc %p.\n",
i,
hdc);
647
650
652 ok(
hr ==
D3D_OK,
"Test %u: got unexpected hr %#x.\n",
i,
hr);
653
657
660 ok(surf_desc.Format == D3DFMT_A8R8G8B8, "Test %u: got unexpected format %#x.\n", i, surf_desc.Format);
661 ok(surf_desc.Usage == 0, "Test %u: got unexpected usage %#x.\n", i, surf_desc.Usage);
662 ok(surf_desc.Width == tests[i].expected_size, "Test %u: got unexpected width %u.\n", i, surf_desc.Width);
663 ok(surf_desc.Height == tests[i].expected_size, "Test %u: got unexpected height %u.\n", i, surf_desc.Height);
664 ok(surf_desc.Pool == D3DPOOL_MANAGED, "Test %u: got unexpected pool %u.\n", i, surf_desc.Pool);
665
666 IDirect3DTexture9_Release(texture);
667
668 /* ID3DXFontImpl_DrawText */
669 D3DXCreateSprite(device, &sprite);
670 SetRect(&rect, 0, 0, 640, 480);
671
672 IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 1.0f, 0);
673
674 IDirect3DDevice9_BeginScene(device);
675 hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_ALPHABLEND);
676 ok (hr == D3D_OK, "Test %d: got unexpected hr %#x.\n", i, hr);
677
678 height = ID3DXFont_DrawTextW(font, sprite, testW, -1, &rect, DT_TOP, 0xffffffff);
679 ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height);
680 height = ID3DXFont_DrawTextW(font, sprite, testW, size, &rect, DT_TOP, 0xffffffff);
681 ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height);
682 height = ID3DXFont_DrawTextW(font, sprite, testW, size, &rect, DT_RIGHT, 0xffffffff);
683 ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height);
684 height = ID3DXFont_DrawTextW(font, sprite, testW, size, &rect, DT_LEFT | DT_NOCLIP, 0xffffffff);
685 ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height);
686
687 SetRectEmpty(&rect);
688 height = ID3DXFont_DrawTextW(font, sprite, testW, size, &rect,
689 DT_LEFT | DT_CALCRECT, 0xffffffff);
690 ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height);
691 ok(!rect.left, "Test %d: got unexpected rect left %d.\n", i, rect.left);
692 ok(!rect.top, "Test %d: got unexpected rect top %d.\n", i, rect.top);
693 ok(rect.right, "Test %d: got unexpected rect right %d.\n", i, rect.right);
694 ok(rect.bottom == tests[i].font_height, "Test %d: got unexpected rect bottom %d.\n", i, rect.bottom);
695
696 hr = ID3DXSprite_End(sprite);
697 ok (hr == D3D_OK, "Test %d: got unexpected hr %#x.\n", i, hr);
698 IDirect3DDevice9_EndScene(device);
699 ID3DXSprite_Release(sprite);
700
701 ID3DXFont_Release(font);
702 }
703
704
705 /* ID3DXFont_DrawTextA, ID3DXFont_DrawTextW */
706 hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
707 DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font);
708 ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
709
710 SetRect(&rect, 10, 10, 200, 200);
711
712 height = ID3DXFont_DrawTextA(font, NULL, "test", -2, &rect, 0, 0xFF00FF);
713 ok(height == 12, "Got unexpected height %d.\n", height);
714
715 height = ID3DXFont_DrawTextA(font, NULL, "test", -1, &rect, 0, 0xFF00FF);
716 ok(height == 12, "Got unexpected height %d.\n", height);
717
718 height = ID3DXFont_DrawTextA(font, NULL, "test", 0, &rect, 0, 0xFF00FF);
719 ok(height == 0, "Got unexpected height %d.\n", height);
720
721 height = ID3DXFont_DrawTextA(font, NULL, "test", 1, &rect, 0, 0xFF00FF);
722 ok(height == 12, "Got unexpected height %d.\n", height);
723
724 height = ID3DXFont_DrawTextA(font, NULL, "test", 2, &rect, 0, 0xFF00FF);
725 ok(height == 12, "Got unexpected height %d.\n", height);
726
727 height = ID3DXFont_DrawTextA(font, NULL, "", 0, &rect, 0, 0xff00ff);
728 ok(height == 0, "Got unexpected height %d.\n", height);
729
730 height = ID3DXFont_DrawTextA(font, NULL, "", -1, &rect, 0, 0xff00ff);
731 ok(height == 0, "Got unexpected height %d.\n", height);
732
733 height = ID3DXFont_DrawTextA(font, NULL, "test", -1, NULL, 0, 0xFF00FF);
734 ok(height == 12, "Got unexpected height %d.\n", height);
735
736 height = ID3DXFont_DrawTextA(font, NULL, "test", -1, NULL, DT_CALCRECT, 0xFF00FF);
737 ok(height == 12, "Got unexpected height %d.\n", height);
738
739 height = ID3DXFont_DrawTextA(font, NULL, NULL, -1, NULL, 0, 0xFF00FF);
740 ok(height == 0, "Got unexpected height %d.\n", height);
741
742 SetRect(&rect, 10, 10, 50, 50);
743
744 height = ID3DXFont_DrawTextA(font, NULL, long_text, -1, &rect, DT_WORDBREAK, 0xff00ff);
745 todo_wine ok(height == 60, "Got unexpected height %d.\n", height);
746
747 height = ID3DXFont_DrawTextA(font, NULL, long_text, -1, &rect, DT_WORDBREAK | DT_NOCLIP, 0xff00ff);
748 ok(height == 96, "Got unexpected height %d.\n", height);
749
750 SetRect(&rect, 10, 10, 200, 200);
751
752 height = ID3DXFont_DrawTextW(font, NULL, testW, -1, &rect, 0, 0xFF00FF);
753 ok(height == 12, "Got unexpected height %d.\n", height);
754
755 height = ID3DXFont_DrawTextW(font, NULL, testW, 0, &rect, 0, 0xFF00FF);
756 ok(height == 0, "Got unexpected height %d.\n", height);
757
758 height = ID3DXFont_DrawTextW(font, NULL, testW, 1, &rect, 0, 0xFF00FF);
759 ok(height == 12, "Got unexpected height %d.\n", height);
760
761 height = ID3DXFont_DrawTextW(font, NULL, testW, 2, &rect, 0, 0xFF00FF);
762 ok(height == 12, "Got unexpected height %d.\n", height);
763
764 height = ID3DXFont_DrawTextW(font, NULL, L"", 0, &rect, 0, 0xff00ff);
765 ok(height == 0, "Got unexpected height %d.\n", height);
766
767 height = ID3DXFont_DrawTextW(font, NULL, L"", -1, &rect, 0, 0xff00ff);
768 ok(height == 0, "Got unexpected height %d.\n", height);
769
770 height = ID3DXFont_DrawTextW(font, NULL, testW, -1, NULL, 0, 0xFF00FF);
771 ok(height == 12, "Got unexpected height %d.\n", height);
772
773 height = ID3DXFont_DrawTextW(font, NULL, testW, -1, NULL, DT_CALCRECT, 0xFF00FF);
774 ok(height == 12, "Got unexpected height %d.\n", height);
775
776 height = ID3DXFont_DrawTextW(font, NULL, NULL, -1, NULL, 0, 0xFF00FF);
777 ok(height == 0, "Got unexpected height %d.\n", height);
778
779 SetRect(&rect, 10, 10, 50, 50);
780
781 height = ID3DXFont_DrawTextW(font, NULL, long_textW, -1, &rect, DT_WORDBREAK, 0xff00ff);
782 todo_wine ok(height == 60, "Got unexpected height %d.\n", height);
783
784 height = ID3DXFont_DrawTextW(font, NULL, long_textW, -1, &rect, DT_WORDBREAK | DT_NOCLIP, 0xff00ff);
785 ok(height == 96, "Got unexpected height %d.\n", height);
786
787 height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, NULL, 0, 0xff00ff);
788 ok(height == 24, "Got unexpected height %d.\n", height);
789
790 height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, 0, 0xff00ff);
791 ok(height == 24, "Got unexpected height %d.\n", height);
792
793 height = ID3DXFont_DrawTextW(font, NULL, L"a\r\na", -1, &rect, 0, 0xff00ff);
794 ok(height == 24, "Got unexpected height %d.\n", height);
795
796 height = ID3DXFont_DrawTextW(font, NULL, L"a\ra", -1, &rect, 0, 0xff00ff);
797 ok(height == 12, "Got unexpected height %d.\n", height);
798
799 height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, DT_SINGLELINE, 0xff00ff);
800 ok(height == 12, "Got unexpected height %d.\n", height);
801
802 height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, DT_SINGLELINE, 0xff00ff);
803 ok(height == 12, "Got unexpected height %d.\n", height);
804
805 height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, 0, 0xff00ff);
806 ok(height == 24, "Got unexpected height %d.\n", height);
807
808 height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
809 ok(height == 36, "Got unexpected height %d.\n", height);
810
811 height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, DT_WORDBREAK | DT_SINGLELINE, 0xff00ff);
812 ok(height == 12, "Got unexpected height %d.\n", height);
813
814 height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, 0, 0xff00ff);
815 ok(height == 48, "Got unexpected height %d.\n", height);
816
817 height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, DT_NOCLIP, 0xff00ff);
818 ok(height == 72, "Got unexpected height %d.\n", height);
819
820 height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\t", -1, &rect, DT_WORDBREAK, 0xff00ff);
821 todo_wine ok(height == 0, "Got unexpected height %d.\n", height);
822
823 height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\ta", -1, &rect, DT_WORDBREAK, 0xff00ff);
824 todo_wine ok(height == 12, "Got unexpected height %d.\n", height);
825
826 height = ID3DXFont_DrawTextW(font, NULL, L"\taaaaaaaaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
827 todo_wine ok(height == 24, "Got unexpected height %d.\n", height);
828
829 height = ID3DXFont_DrawTextW(font, NULL, L"\taaaaaaaaaa", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
830 ok(height == 36, "Got unexpected height %d.\n", height);
831
832 height = ID3DXFont_DrawTextW(font, NULL, L"\taaa\taaa\taaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
833 ok(height == 24, "Got unexpected height %d.\n", height);
834
835 height = ID3DXFont_DrawTextW(font, NULL, L"\taaa\taaa\taaa", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
836 todo_wine ok(height == 48, "Got unexpected height %d.\n", height);
837
838 height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\t", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
839 todo_wine ok(height == 60, "Got unexpected height %d.\n", height);
840
841 height = ID3DXFont_DrawTextW(font, NULL, L"a\ta", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
842 ok(height == 12, "Got unexpected height %d.\n", height);
843
844 height = ID3DXFont_DrawTextW(font, NULL, L"a\ta\ta", -1, &rect, DT_EXPANDTABS | DT_WORDBREAK, 0xff00ff);
845 todo_wine ok(height == 24, "Got unexpected height %d.\n", height);
846
847 height = ID3DXFont_DrawTextW(font, NULL, L"aaaaaaaaaaaaaaaaaaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
848 ok(height == 36, "Got unexpected height %d.\n", height);
849
850 height = ID3DXFont_DrawTextW(font, NULL, L"a a", -1, &rect, DT_WORDBREAK, 0xff00ff);
851 ok(height == 36, "Got unexpected height %d.\n", height);
852
853 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK, 0xff00ff);
854 ok(height == 36, "Got unexpected height %d.\n", height);
855
856 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_RIGHT, 0xff00ff);
857 ok(height == 36, "Got unexpected height %d.\n", height);
858
859 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CENTER, 0xff00ff);
860 ok(height == 36, "Got unexpected height %d.\n", height);
861
862 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM, 0xff00ff);
863 ok(height == 40, "Got unexpected height %d.\n", height);
864
865 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER, 0xff00ff);
866 ok(height == 32, "Got unexpected height %d.\n", height);
867
868 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT, 0xff00ff);
869 ok(height == 24, "Got unexpected height %d.\n", height);
870
871 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER, 0xff00ff);
872 ok(height == 24, "Got unexpected height %d.\n", height);
873
874 SetRect(&rect, 10, 10, 50, 50);
875 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CALCRECT, 0xff00ff);
876 ok(height == 24, "Got unexpected height %d.\n", height);
877 check_rect(&rect, 10, 10, 30, 34);
878
879 SetRect(&rect, -10, 10, 30, 50);
880 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CALCRECT, 0xff00ff);
881 ok(height == 24, "Got unexpected height %d.\n", height);
882 check_rect(&rect, -10, 10, 10, 34);
883
884 SetRect(&rect, 10, -10, 50, 30);
885 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CALCRECT, 0xff00ff);
886 ok(height == 24, "Got unexpected height %d.\n", height);
887 check_rect(&rect, 10, -10, 30, 14);
888
889 SetRect(&rect, 10, 10, -30, 50);
890 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CALCRECT, 0xff00ff);
891 ok(height == 24, "Got unexpected height %d.\n", height);
892 check_rect(&rect, 10, 10, 30, 34);
893
894 SetRect(&rect, 10, 10, 50, -30);
895 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CALCRECT, 0xff00ff);
896 ok(height == 24, "Got unexpected height %d.\n", height);
897 check_rect(&rect, 10, 10, 30, 34);
898
899 SetRect(&rect, 10, 10, 50, 50);
900 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
901 ok(height == 24, "Got unexpected height %d.\n", height);
902 check_rect(&rect, 10, 10, 30, 34);
903
904 SetRect(&rect, -10, 10, 30, 50);
905 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
906 ok(height == 24, "Got unexpected height %d.\n", height);
907 check_rect(&rect, -10, 10, 10, 34);
908
909 SetRect(&rect, 10, -10, 50, 30);
910 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
911 ok(height == 24, "Got unexpected height %d.\n", height);
912 check_rect(&rect, 10, -10, 30, 14);
913
914 SetRect(&rect, 10, 10, -30, 50);
915 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
916 ok(height == 12, "Got unexpected height %d.\n", height);
917 check_rect(&rect, 10, 10, 53, 22);
918
919 SetRect(&rect, 10, 10, 50, -30);
920 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
921 ok(height == 24, "Got unexpected height %d.\n", height);
922 check_rect(&rect, 10, 10, 30, 34);
923
924 SetRect(&rect, 10, 10, 50, 50);
925 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM | DT_CALCRECT, 0xff00ff);
926 ok(height == 40, "Got unexpected height %d.\n", height);
927 check_rect(&rect, 10, 26, 30, 50);
928
929 SetRect(&rect, -10, 10, 30, 50);
930 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM | DT_CALCRECT, 0xff00ff);
931 ok(height == 40, "Got unexpected height %d.\n", height);
932 check_rect(&rect, -10, 26, 10, 50);
933
934 SetRect(&rect, 10, -10, 50, 30);
935 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM | DT_CALCRECT, 0xff00ff);
936 ok(height == 40, "Got unexpected height %d.\n", height);
937 check_rect(&rect, 10, 6, 30, 30);
938
939 SetRect(&rect, 10, 10, -30, 50);
940 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM | DT_CALCRECT, 0xff00ff);
941 ok(height == 40, "Got unexpected height %d.\n", height);
942 check_rect(&rect, 10, 26, 30, 50);
943
944 SetRect(&rect, 10, 10, 50, -30);
945 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_BOTTOM | DT_CALCRECT, 0xff00ff);
946 ok(height == -40, "Got unexpected height %d.\n", height);
947 check_rect(&rect, 10, -54, 30, -30);
948
949 SetRect(&rect, 10, 10, 50, 50);
950 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_BOTTOM | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
951 ok(height == 40, "Got unexpected height %d.\n", height);
952 check_rect(&rect, 10, 26, 30, 50);
953
954 SetRect(&rect, -10, 10, 30, 50);
955 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_BOTTOM | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
956 ok(height == 40, "Got unexpected height %d.\n", height);
957 check_rect(&rect, -10, 26, 10, 50);
958
959 SetRect(&rect, 10, -10, 50, 30);
960 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_BOTTOM | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
961 ok(height == 40, "Got unexpected height %d.\n", height);
962 check_rect(&rect, 10, 6, 30, 30);
963
964 SetRect(&rect, 10, 10, -30, 50);
965 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_BOTTOM | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
966 ok(height == 40, "Got unexpected height %d.\n", height);
967 check_rect(&rect, 10, 38, 53, 50);
968
969 SetRect(&rect, 10, 10, 50, -30);
970 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_BOTTOM | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
971 ok(height == -40, "Got unexpected height %d.\n", height);
972 check_rect(&rect, 10, -54, 30, -30);
973
974 SetRect(&rect, 10, 10, 50, 50);
975 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER | DT_CALCRECT, 0xff00ff);
976 ok(height == 32, "Got unexpected height %d.\n", height);
977 check_rect(&rect, 10, 18, 30, 42);
978
979 SetRect(&rect, -10, 10, 30, 50);
980 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER | DT_CALCRECT, 0xff00ff);
981 ok(height == 32, "Got unexpected height %d.\n", height);
982 check_rect(&rect, -10, 18, 10, 42);
983
984 SetRect(&rect, 10, -10, 50, 30);
985 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER | DT_CALCRECT, 0xff00ff);
986 ok(height == 32, "Got unexpected height %d.\n", height);
987 check_rect(&rect, 10, -2, 30, 22);
988
989 SetRect(&rect, 10, 10, -30, 50);
990 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER | DT_CALCRECT, 0xff00ff);
991 ok(height == 32, "Got unexpected height %d.\n", height);
992 check_rect(&rect, 10, 18, 30, 42);
993
994 SetRect(&rect, 10, 10, 50, -30);
995 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_VCENTER | DT_CALCRECT, 0xff00ff);
996 ok(height == -8, "Got unexpected height %d.\n", height);
997 check_rect(&rect, 10, -22, 30, 2);
998
999 SetRect(&rect, 10, 10, 50, 50);
1000 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1001 ok(height == 32, "Got unexpected height %d.\n", height);
1002 check_rect(&rect, 10, 18, 30, 42);
1003
1004 SetRect(&rect, -10, 10, 30, 50);
1005 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1006 ok(height == 32, "Got unexpected height %d.\n", height);
1007 check_rect(&rect, -10, 18, 10, 42);
1008
1009 SetRect(&rect, 10, -10, 50, 30);
1010 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1011 ok(height == 32, "Got unexpected height %d.\n", height);
1012 check_rect(&rect, 10, -2, 30, 22);
1013
1014 SetRect(&rect, 10, 10, -30, 50);
1015 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1016 ok(height == 26, "Got unexpected height %d.\n", height);
1017 check_rect(&rect, 10, 24, 53, 36);
1018
1019 SetRect(&rect, 10, 10, 50, -30);
1020 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1021 ok(height == -8, "Got unexpected height %d.\n", height);
1022 check_rect(&rect, 10, -22, 30, 2);
1023
1024 SetRect(&rect, 10, 10, 50, 50);
1025 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT | DT_CALCRECT, 0xff00ff);
1026 ok(height == 24, "Got unexpected height %d.\n", height);
1027 check_rect(&rect, 30, 10, 50, 34);
1028
1029 SetRect(&rect, -10, 10, 30, 50);
1030 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT | DT_CALCRECT, 0xff00ff);
1031 ok(height == 24, "Got unexpected height %d.\n", height);
1032 check_rect(&rect, 10, 10, 30, 34);
1033
1034 SetRect(&rect, 10, -10, 50, 30);
1035 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT | DT_CALCRECT, 0xff00ff);
1036 ok(height == 24, "Got unexpected height %d.\n", height);
1037 check_rect(&rect, 30, -10, 50, 14);
1038
1039 SetRect(&rect, 10, 10, -30, 50);
1040 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT | DT_CALCRECT, 0xff00ff);
1041 ok(height == 24, "Got unexpected height %d.\n", height);
1042 check_rect(&rect, -50, 10, -30, 34);
1043
1044 SetRect(&rect, 10, 10, 50, -30);
1045 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT | DT_CALCRECT, 0xff00ff);
1046 ok(height == 24, "Got unexpected height %d.\n", height);
1047 check_rect(&rect, 30, 10, 50, 34);
1048
1049 SetRect(&rect, 10, 10, 50, 50);
1050 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_RIGHT | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1051 ok(height == 24, "Got unexpected height %d.\n", height);
1052 check_rect(&rect, 30, 10, 50, 34);
1053
1054 SetRect(&rect, -10, 10, 30, 50);
1055 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_RIGHT | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1056 ok(height == 24, "Got unexpected height %d.\n", height);
1057 check_rect(&rect, 10, 10, 30, 34);
1058
1059 SetRect(&rect, 10, -10, 50, 30);
1060 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_RIGHT | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1061 ok(height == 24, "Got unexpected height %d.\n", height);
1062 check_rect(&rect, 30, -10, 50, 14);
1063
1064 SetRect(&rect, 10, 10, -30, 50);
1065 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_RIGHT | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1066 ok(height == 12, "Got unexpected height %d.\n", height);
1067 check_rect(&rect, -73, 10, -30, 22);
1068
1069 SetRect(&rect, 10, 10, 50, -30);
1070 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_RIGHT | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1071 ok(height == 24, "Got unexpected height %d.\n", height);
1072 check_rect(&rect, 30, 10, 50, 34);
1073
1074 SetRect(&rect, 10, 10, 50, 50);
1075 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_CALCRECT, 0xff00ff);
1076 ok(height == 24, "Got unexpected height %d.\n", height);
1077 check_rect(&rect, 20, 10, 40, 34);
1078
1079 SetRect(&rect, -10, 10, 30, 50);
1080 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_CALCRECT, 0xff00ff);
1081 ok(height == 24, "Got unexpected height %d.\n", height);
1082 check_rect(&rect, 0, 10, 20, 34);
1083
1084 SetRect(&rect, 10, -10, 50, 30);
1085 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_CALCRECT, 0xff00ff);
1086 ok(height == 24, "Got unexpected height %d.\n", height);
1087 check_rect(&rect, 20, -10, 40, 14);
1088
1089 SetRect(&rect, 10, 10, -30, 50);
1090 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_CALCRECT, 0xff00ff);
1091 ok(height == 24, "Got unexpected height %d.\n", height);
1092 check_rect(&rect, -20, 10, 0, 34);
1093
1094 SetRect(&rect, 10, 10, 50, -30);
1095 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_CALCRECT, 0xff00ff);
1096 ok(height == 24, "Got unexpected height %d.\n", height);
1097 check_rect(&rect, 20, 10, 40, 34);
1098
1099 SetRect(&rect, 10, 10, 50, 50);
1100 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1101 ok(height == 24, "Got unexpected height %d.\n", height);
1102 check_rect(&rect, 20, 10, 40, 34);
1103
1104 SetRect(&rect, -10, 10, 30, 50);
1105 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1106 ok(height == 24, "Got unexpected height %d.\n", height);
1107 check_rect(&rect, 0, 10, 20, 34);
1108
1109 SetRect(&rect, 10, -10, 50, 30);
1110 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1111 ok(height == 24, "Got unexpected height %d.\n", height);
1112 check_rect(&rect, 20, -10, 40, 14);
1113
1114 SetRect(&rect, 10, 10, -30, 50);
1115 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1116 ok(height == 12, "Got unexpected height %d.\n", height);
1117 check_rect(&rect, -31, 10, 12, 22);
1118
1119 SetRect(&rect, 10, 10, 50, -30);
1120 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1121 ok(height == 24, "Got unexpected height %d.\n", height);
1122 check_rect(&rect, 20, 10, 40, 34);
1123
1124 SetRect(&rect, 10, 10, 50, 50);
1125 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1126 ok(height == 32, "Got unexpected height %d.\n", height);
1127 check_rect(&rect, 20, 18, 40, 42);
1128
1129 SetRect(&rect, 10, 10, 50, 50);
1130 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1131 ok(height == 32, "Got unexpected height %d.\n", height);
1132 check_rect(&rect, 20, 18, 40, 42);
1133
1134 SetRect(&rect, -10, 10, 30, 50);
1135 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1136 ok(height == 32, "Got unexpected height %d.\n", height);
1137 check_rect(&rect, 0, 18, 20, 42);
1138
1139 SetRect(&rect, 10, -10, 50, 30);
1140 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1141 ok(height == 32, "Got unexpected height %d.\n", height);
1142 check_rect(&rect, 20, -2, 40, 22);
1143
1144 SetRect(&rect, 10, 10, -30, 50);
1145 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1146 ok(height == 32, "Got unexpected height %d.\n", height);
1147 check_rect(&rect, -20, 18, 0, 42);
1148
1149 SetRect(&rect, 10, 10, 50, -30);
1150 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_CALCRECT, 0xff00ff);
1151 ok(height == -8, "Got unexpected height %d.\n", height);
1152 check_rect(&rect, 20, -22, 40, 2);
1153
1154 SetRect(&rect, 10, 10, 50, 50);
1155 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1156 ok(height == 32, "Got unexpected height %d.\n", height);
1157 check_rect(&rect, 20, 18, 40, 42);
1158
1159 SetRect(&rect, 10, 10, 50, 50);
1160 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1161 ok(height == 32, "Got unexpected height %d.\n", height);
1162 check_rect(&rect, 20, 18, 40, 42);
1163
1164 SetRect(&rect, -10, 10, 30, 50);
1165 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1166 ok(height == 32, "Got unexpected height %d.\n", height);
1167 check_rect(&rect, 0, 18, 20, 42);
1168
1169 SetRect(&rect, 10, -10, 50, 30);
1170 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1171 ok(height == 32, "Got unexpected height %d.\n", height);
1172 check_rect(&rect, 20, -2, 40, 22);
1173
1174 SetRect(&rect, 10, 10, -30, 50);
1175 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1176 ok(height == 26, "Got unexpected height %d.\n", height);
1177 check_rect(&rect, -31, 24, 12, 36);
1178
1179 SetRect(&rect, 10, 10, 50, -30);
1180 height = ID3DXFont_DrawTextW(font, NULL, L"aaaa aaaa", -1, &rect, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_CALCRECT, 0xff00ff);
1181 ok(height == -8, "Got unexpected height %d.\n", height);
1182 check_rect(&rect, 20, -22, 40, 2);
1183
1184 ID3DXFont_Release(font);
1185}
int strcmp(const char *String1, const char *String2)
char * strcpy(char *DstString, const char *SrcString)
#define IDirect3DTexture9_GetLevelDesc(p, a, b)
#define IDirect3DTexture9_GetLevelCount(p)
struct ID3DXFont ID3DXFont
#define ID3DXFont_PreloadCharacters(p, a, b)
#define ID3DXFont_PreloadTextW(p, a, b)
#define ID3DXFont_GetDescA(p, a)
#define ID3DXFont_GetTextMetricsW(p, a)
#define ID3DXFont_GetDC(p)
#define ID3DXFont_Release(p)
#define ID3DXFont_GetGlyphData(p, a, b, c, d)
#define ID3DXFont_GetTextMetricsA(p, a)
#define ID3DXFont_PreloadGlyphs(p, a, b)
#define ID3DXFont_GetDevice(p, a)
#define ID3DXFont_PreloadTextA(p, a, b)
HRESULT WINAPI D3DXCreateFontA(struct IDirect3DDevice9 *device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, DWORD charset, DWORD precision, DWORD quality, DWORD pitchandfamily, const char *facename, struct ID3DXFont **font)
HRESULT WINAPI D3DXCreateFontIndirectA(IDirect3DDevice9 *device, const D3DXFONT_DESCA *desc, ID3DXFont **font)
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
_CRTIMP void __cdecl unexpected(void)
static const WCHAR testW[]
#define todo_wine_if(is_todo)
static int font_height(HFONT hFont)
#define ANTIALIASED_QUALITY
#define OUT_RASTER_PRECIS
#define OUT_DEFAULT_PRECIS
DWORD WINAPI GetGlyphIndicesA(_In_ HDC hdc, _In_reads_(c) LPCSTR lpstr, _In_ int c, _Out_writes_(c) LPWORD pgi, _In_ DWORD fl)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
DWORD WINAPI GetGlyphOutlineW(_In_ HDC hdc, _In_ UINT uChar, _In_ UINT fuFormat, _Out_ LPGLYPHMETRICS lpgm, _In_ DWORD cjBuffer, _Out_writes_bytes_opt_(cjBuffer) LPVOID pvBuffer, _In_ CONST MAT2 *lpmat2)