1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
procedure TForm1.FormCreate(Sender: TObject);
var haFont : HFONT;
WinTempDir : PChar;
begin
GetMem(WinTempDir,255);
GetTempPath(255,WinTempDir);
GetTempFileName(WinTempDir,'Xdf',3,FileNameTemp);
CreateScalableFontResource(0,FileNameTemp,'lhandw.ttf',nil);
AddFontResource(FileNameTemp);//Lucida Handwriting
haFont:=CreateFont (18,7,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH or FF_ROMAN,
'Lucida Handwriting');
Label1.Font.Handle:=haFont;
Label4.Font.Handle:=haFont;
Label5.Font.Handle:=haFont;
haFont:=CreateFont (46,20,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH or FF_ROMAN,
'Lucida Handwriting');
RxLabel1.Font.Handle:=haFont;
RxLabel2.Font.Handle:=haFont;
end; |
Partager