mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-15 00:19:07 +02:00
LazUtils: fix for TFreeTypeFont.SetPointSize. Patch from circular
git-svn-id: trunk@40427 -
This commit is contained in:
parent
fbcb0937b4
commit
faea508795
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user