Language:
Русский
English
{StPrnFnt.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the SetPrnFonts function}
program Test;
uses WinTypes, WinProcs, WinCrt, WinPrn;
Prn: Text;
OldFont: HFont;
begin
Writeln('Printing...');
AssignDefPrn(Prn);
Rewrite(Prn);
Writeln(Prn, 'Some text');
OldFont := SetPrnFont(Prn, CreateFont(100, 0, 0, 0, 0, 0, 0, 0, 1,
Out_Default_Precis, Clip_Default_Precis, Default_Quality,
ff_Roman, nil);
Writeln(Prn, 'Some text in a new font');
DeleteObject(SetPrnFont(Prn, OldFont));
Writeln(Prn, 'Back to the old font');
Close(Prn);
Writeln('Done');
end.