用WINDOWS的API:
HFONT CreateFontIndirect(
CONST LOGFONT *lplf // pointer to logical font structure
);
//用法:Canvas.Font.Handle := CreateFontIndirect(...);
其中LOGFONT的定义是:
typedef struct tagLOGFONT { // lf
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
TCHAR lfFaceName[LF_FACESIZE];
} LOGFONT;
显然
LONG lfHeight;
LONG lfWidth;
就是你要的。
注:我没有试过,但应该没问题。(有些字体可能不支持)