PDA

View Full Version : سوال: قلم بین معمولی و ضخیم؟



mbshareat
جمعه 26 آبان 1391, 10:45 صبح
سلام
من ضخامت قلم بین معمولی و ضخیم میخوام خودم برای بدست آوردنش مقدار lfWeight رو در کد زیر تغییر میدم اما به نتیجه مناسب نمی رسم؟به نظرم برنامه pdf Machine یه چنین حالتی داره!

procedure SetFontToClearType(const aFont: TFont);
var
LogFont: TLogFont; TempFont: TFont;
begin
TempFont:= TFont.Create;
try
TempFont.Assign(aFont);
GetObject(TempFont.Handle, sizeof(LogFont), @LogFont);
LogFont.lfQuality := 5;
LogFont.lfWeight := 500;
TempFont.Handle:= CreateFontIndirect(LogFont);
aFont.Assign(TempFont);
finally
TempFont.Free;
end;
end;