var
LogFont: TLogFont;
theFont: TFont;
begin
with Form1.Canvas do
begin
Font.Name := '宋体';
Font.Size := 18;
Font.Color := clYellow;
theFont := TFont.Create;
theFont.Assign( Font );
GetObject( theFont.Handle, Sizeof(LogFont), @LogFont );
LogFont.lfEscapement := 450; // 45度
LogFont.lfOrientation := 450; // 45度
theFont.Handle := CreateFontIndirect( LogFont );
Font.Assign( theFont );
theFont.Free;
TextOut( X, Y, 'Hello!' );
end;
end;
……