mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-15 23:40:34 +01:00
LazFreeType: Adds some $R- to disable range check which seams to cause problems with FPC 2.7 and expands a with
git-svn-id: trunk@38416 -
This commit is contained in:
parent
9bd1e7a1d6
commit
4cf053d2ba
@ -36,6 +36,7 @@ unit LazFreeType;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$R-}
|
||||||
uses TTTypes;
|
uses TTTypes;
|
||||||
|
|
||||||
(***********************************************************************)
|
(***********************************************************************)
|
||||||
|
|||||||
@ -47,6 +47,7 @@ Unit TTFile;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
{$I TTCONFIG.INC}
|
{$I TTCONFIG.INC}
|
||||||
|
{$R-}
|
||||||
|
|
||||||
uses TTTypes,
|
uses TTTypes,
|
||||||
TTError;
|
TTError;
|
||||||
|
|||||||
@ -25,6 +25,7 @@ Unit TTLoad;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$R-}
|
||||||
uses TTTypes, TTTables, TTCMap, TTObjs;
|
uses TTTypes, TTTables, TTCMap, TTObjs;
|
||||||
|
|
||||||
function LookUp_TrueType_Table( face : PFace;
|
function LookUp_TrueType_Table( face : PFace;
|
||||||
@ -237,7 +238,7 @@ uses TTError, TTMemory, TTFile;
|
|||||||
|
|
||||||
{$IFDEF FREETYPE_DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF}
|
{$IFDEF FREETYPE_DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF}
|
||||||
|
|
||||||
TT_Forget_Frame;
|
TT_Forget_Frame();
|
||||||
|
|
||||||
(* Check that we have a 'sfnt' format there *)
|
(* Check that we have a 'sfnt' format there *)
|
||||||
if (tableDir.version <> $10000 ) and (* MS fonts *)
|
if (tableDir.version <> $10000 ) and (* MS fonts *)
|
||||||
@ -248,25 +249,20 @@ uses TTError, TTMemory, TTFile;
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with face^ do
|
face^.numTables := tableDir.numTables;
|
||||||
|
|
||||||
|
if Alloc( face^.dirTables, face^.numTables * sizeof( TTableDirEntry ) ) or
|
||||||
|
TT_Access_Frame( 16 * face^.numTables ) then exit;
|
||||||
|
|
||||||
|
for n := 0 to face^.numTables-1 do
|
||||||
begin
|
begin
|
||||||
|
face^.dirTables^[n].Tag := GET_ULong;
|
||||||
|
face^.dirTables^[n].Checksum := GET_ULong;
|
||||||
|
face^.dirTables^[n].Offset := GET_Long;
|
||||||
|
face^.dirTables^[n].Length := Get_Long;
|
||||||
|
end;
|
||||||
|
|
||||||
numTables := tableDir.numTables;
|
TT_Forget_Frame();
|
||||||
|
|
||||||
if Alloc( dirTables, numTables * sizeof( TTableDirEntry ) ) or
|
|
||||||
TT_Access_Frame( 16 * numTables ) then exit;
|
|
||||||
|
|
||||||
for n := 0 to numTables-1 do with dirTables^[n] do
|
|
||||||
begin
|
|
||||||
Tag := GET_ULong;
|
|
||||||
Checksum := GET_ULong;
|
|
||||||
Offset := GET_Long;
|
|
||||||
Length := Get_Long;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TT_Forget_Frame;
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,7 @@ interface
|
|||||||
uses TTTypes;
|
uses TTTypes;
|
||||||
|
|
||||||
{$I TTCONFIG.INC}
|
{$I TTCONFIG.INC}
|
||||||
|
{$R-}
|
||||||
|
|
||||||
type
|
type
|
||||||
TMarkRecord = record
|
TMarkRecord = record
|
||||||
|
|||||||
@ -82,6 +82,7 @@ interface
|
|||||||
{$mode Delphi}
|
{$mode Delphi}
|
||||||
|
|
||||||
{$I TTCONFIG.INC}
|
{$I TTCONFIG.INC}
|
||||||
|
{$R-}
|
||||||
|
|
||||||
uses LazFreeType,
|
uses LazFreeType,
|
||||||
TTTypes,
|
TTTypes,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user