mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-04 07:16:36 +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;
|
procedure FetchNames;
|
||||||
function GetCollection: TCustomFreeTypeFontCollection;
|
function GetCollection: TCustomFreeTypeFontCollection;
|
||||||
function CheckFace: boolean;
|
function CheckFace: boolean;
|
||||||
function CheckInstance: boolean;
|
|
||||||
public
|
public
|
||||||
Quality : TGlyphRenderQuality;
|
Quality : TGlyphRenderQuality;
|
||||||
SmallLinePadding: boolean;
|
SmallLinePadding: boolean;
|
||||||
@ -293,6 +292,7 @@ type
|
|||||||
function CharsWidth(AText: string): ArrayOfSingle;
|
function CharsWidth(AText: string): ArrayOfSingle;
|
||||||
function CharsPosition(AText: string): ArrayOfCharPosition; overload;
|
function CharsPosition(AText: string): ArrayOfCharPosition; overload;
|
||||||
function CharsPosition(AText: string; AAlign: TFreeTypeAlignments): ArrayOfCharPosition; overload;
|
function CharsPosition(AText: string; AAlign: TFreeTypeAlignments): ArrayOfCharPosition; overload;
|
||||||
|
function CheckInstance: boolean;
|
||||||
property Name: String read FName write SetName;
|
property Name: String read FName write SetName;
|
||||||
property DPI: integer read GetDPI write SetDPI;
|
property DPI: integer read GetDPI write SetDPI;
|
||||||
property SizeInPoints: single read FPointSize write SetPointSize;
|
property SizeInPoints: single read FPointSize write SetPointSize;
|
||||||
@ -946,6 +946,11 @@ end;
|
|||||||
|
|
||||||
function TFreeTypeFont.GetCharIndex(AUnicodeChar: integer): integer;
|
function TFreeTypeFont.GetCharIndex(AUnicodeChar: integer): integer;
|
||||||
begin
|
begin
|
||||||
|
if not CheckInstance then
|
||||||
|
begin
|
||||||
|
result := 0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
if FCharmapOk then
|
if FCharmapOk then
|
||||||
begin
|
begin
|
||||||
if FCharmapSymbol then
|
if FCharmapSymbol then
|
||||||
|
Loading…
Reference in New Issue
Block a user