mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-23 18:45:59 +02:00
LazUtils: Call LazFreeType.CheckInstance in GetCharIndex and make it public. Issue #28163, patch from Johann.
git-svn-id: trunk@49146 -
This commit is contained in:
parent
73d0bc5ed1
commit
824f9ac5d9
@ -275,7 +275,6 @@ type
|
||||
procedure FetchNames;
|
||||
function GetCollection: TCustomFreeTypeFontCollection;
|
||||
function CheckFace: boolean;
|
||||
function CheckInstance: boolean;
|
||||
public
|
||||
Quality : TGlyphRenderQuality;
|
||||
SmallLinePadding: boolean;
|
||||
@ -293,6 +292,7 @@ type
|
||||
function CharsWidth(AText: string): ArrayOfSingle;
|
||||
function CharsPosition(AText: string): ArrayOfCharPosition; overload;
|
||||
function CharsPosition(AText: string; AAlign: TFreeTypeAlignments): ArrayOfCharPosition; overload;
|
||||
function CheckInstance: boolean;
|
||||
property Name: String read FName write SetName;
|
||||
property DPI: integer read GetDPI write SetDPI;
|
||||
property SizeInPoints: single read FPointSize write SetPointSize;
|
||||
@ -946,6 +946,11 @@ end;
|
||||
|
||||
function TFreeTypeFont.GetCharIndex(AUnicodeChar: integer): integer;
|
||||
begin
|
||||
if not CheckInstance then
|
||||
begin
|
||||
result := 0;
|
||||
exit;
|
||||
end;
|
||||
if FCharmapOk then
|
||||
begin
|
||||
if FCharmapSymbol then
|
||||
|
Loading…
Reference in New Issue
Block a user