LazUtils: fix for TFreeTypeFont.SetPointSize. Patch from circular

git-svn-id: trunk@40427 -
This commit is contained in:
juha 2013-02-27 10:51:20 +00:00
parent fbcb0937b4
commit faea508795

View File

@ -222,7 +222,7 @@ type
procedure DiscardInstance;
procedure DiscardStream;
procedure SetPixelSize(const AValue: single);
procedure SetPointSize(const AValue: single);
procedure SetPointSize(AValue: single);
function LoadGlyphInto(_glyph : TT_Glyph;
glyph_index : Word): boolean;
procedure SetWidthFactor(const AValue: single);
@ -380,6 +380,8 @@ type
function StylesToArray(AStyles: string): ArrayOfString;
const FreeTypeMinPointSize = 1;
implementation
uses Math;
@ -1072,8 +1074,9 @@ begin
SizeInPoints := AValue*72/DPI;
end;
procedure TFreeTypeFont.SetPointSize(const AValue: single);
procedure TFreeTypeFont.SetPointSize(AValue: single);
begin
if AValue < FreeTypeMinPointSize then AValue := FreeTypeMinPointSize;
if FPointSize=AValue then exit;
FPointSize:=AValue;
if FInstanceCreated then