//声明: SetTextCharacterExtra( DC: HDC; {设备环境句柄} CharExtra: Integer {间距(按逻辑单位); 若映射模式不是 MM_TEXT, 则舍入到最接近的像素} ): Integer; {返回字符间隔的先前值; 调用失败返回 $80000000 }
//举例: procedure TForm1.FormPaint(Sender: TObject); const str = '万一的 Delphi 博客'; begin TextOut(Canvas.Handle, 50, 50, str, Length(str)); SetTextCharacterExtra(Canvas.Handle, 10); TextOut(Canvas.Handle, 50, 80, str, Length(str)); end;
//效果图:
![](https://www.cnblogs.com/images/cnblogs_com/del/121273/r_8288.png)