DWORD Size;
MAT2 Mat={0};
Mat.eM11.value=1;
Mat.eM22.value=1;
GLYPHMETRICS gm={0};
TTPOLYGONHEADER* Header;
CFontOutLine FontOutLine;
for(int i=0; i<strlen(Text); i++)
{
Size=GetGlyphOutline(hMemoryDC, Text[i], GGO_NATIVE, &gm, NULL, NULL, &Mat);
if(Size!=GDI_ERROR)
{
Header=(TTPOLYGONHEADER*)malloc(Size);
GetGlyphOutline(hMemoryDC, Text[i], GGO_NATIVE, &gm, Size, Header, &Mat);
FontOutLine.DrawCurve(hMemoryDC, Header, Size);
free(Header);
}
}
    DeleteObject(hFont);void CFontOutLine::DrawCurve(HDC hDC, TTPOLYGONHEADER* Header, DWORD Size)
{
//绘制字体曲线
int i;
TTPOLYCURVE* Curve;
while(Size>0)
{
Size-=Header->cb;
if(Header->dwType==TT_POLYGON_TYPE)
{
AddPoint(IntFromFixed(Header->pfxStart.x), IntFromFixed(Header->pfxStart.y), PT_MOVETO);
Curve=(TTPOLYCURVE*)(Header+1);
while((DWORD)Curve<(DWORD)Header+Header->cb)
{
switch(Curve->wType)
{
case TT_PRIM_LINE:
for(i=0; i<Curve->cpfx; i++)
AddPoint(IntFromFixed(Curve->apfx[i].x), IntFromFixed(Curve->apfx[i].y), PT_LINETO);
break;
case TT_PRIM_QSPLINE:
if(Curve->cpfx>=2)
{
for(i=0; i<Curve->cpfx-1; i++)
{
if(i==Curve->cpfx-2)
AddQSPLine(IntFromFixed(Curve->apfx[i].x), IntFromFixed(Curve->apfx[i].y), 
IntFromFixed(Curve->apfx[i+1].x), IntFromFixed(Curve->apfx[i+1].y));
else
AddQSPLine(IntFromFixed(Curve->apfx[i].x), IntFromFixed(Curve->apfx[i].y), 
(IntFromFixed(Curve->apfx[i].x)+IntFromFixed(Curve->apfx[i+1].x))/2, 
(IntFromFixed(Curve->apfx[i].y)+IntFromFixed(Curve->apfx[i+1].y))/2);
}
}
break;
case TT_PRIM_CSPLINE:
if((Curve->cpfx%3)==0)
{
for(i=0; i<Curve->cpfx; i+=3)
AddCSPLine(IntFromFixed(Curve->apfx[i].x), IntFromFixed(Curve->apfx[i].y), 
IntFromFixed(Curve->apfx[i+1].x), IntFromFixed(Curve->apfx[i+1].y), 
IntFromFixed(Curve->apfx[i+2].x), IntFromFixed(Curve->apfx[i+2].y));
}
}
Curve=(TTPOLYCURVE*)&Curve->apfx[Curve->cpfx];
}
LineStyle[Index-1]|=PT_CLOSEFIGURE;
Header+=Header->cb;
}
}
PolyDraw(hDC, Point, LineStyle, Index);
}
void CFontOutLine::AddPoint(int x, int y, BYTE Style)
{
//添加点
Point[Index].x=x;
Point[Index].y=y;
LineStyle[Index]=Style;
Index++;
}
void CFontOutLine::AddQSPLine(int x1, int y1, int x2, int y2)
{
//添加曲线
int x0=Point[Index-1].x;
int y0=Point[Index-1].y;
AddCSPLine((x0+2*x1)/3, (y0+2*y1)/3, (2*x1+x2)/3, (2*y1+y2)/3, x2, y2);
}
void CFontOutLine::AddCSPLine(int x1, int y1, int x2, int y2, int x3, int y3)
{
//添加曲线
AddPoint(x1, y1, PT_BEZIERTO);
AddPoint(x2, y2, PT_BEZIERTO);
AddPoint(x3, y3, PT_BEZIERTO);
}
int CFontOutLine::IntFromFixed(FIXED Fixed)
{
//从Fixed中取得Int
    if(Fixed.fract>=0x8000)
        return(Fixed.value+1);
    else
        return(Fixed.value);
}
=================================================
为何GetGlyphOutline这样操作,绘制的文字是倒的,请高手帮助?