diff --git a/components/lazutils/lazfreetype.pas b/components/lazutils/lazfreetype.pas index eae3004183..3f5fe48c73 100644 --- a/components/lazutils/lazfreetype.pas +++ b/components/lazutils/lazfreetype.pas @@ -36,6 +36,7 @@ unit LazFreeType; interface +{$R-} uses TTTypes; (***********************************************************************) diff --git a/components/lazutils/ttfile.pas b/components/lazutils/ttfile.pas index 8f9628f472..937cb8f7ef 100644 --- a/components/lazutils/ttfile.pas +++ b/components/lazutils/ttfile.pas @@ -47,6 +47,7 @@ Unit TTFile; interface {$I TTCONFIG.INC} +{$R-} uses TTTypes, TTError; diff --git a/components/lazutils/ttload.pas b/components/lazutils/ttload.pas index 2192800979..558a0f085a 100644 --- a/components/lazutils/ttload.pas +++ b/components/lazutils/ttload.pas @@ -25,6 +25,7 @@ Unit TTLoad; interface +{$R-} uses TTTypes, TTTables, TTCMap, TTObjs; function LookUp_TrueType_Table( face : PFace; @@ -237,7 +238,7 @@ uses TTError, TTMemory, TTFile; {$IFDEF FREETYPE_DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF} - TT_Forget_Frame; + TT_Forget_Frame(); (* Check that we have a 'sfnt' format there *) if (tableDir.version <> $10000 ) and (* MS fonts *) @@ -248,25 +249,20 @@ uses TTError, TTMemory, TTFile; exit; 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 + 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; - - 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; + TT_Forget_Frame(); {$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF} diff --git a/components/lazutils/ttmemory.pas b/components/lazutils/ttmemory.pas index 3250e92a59..027351c2dd 100644 --- a/components/lazutils/ttmemory.pas +++ b/components/lazutils/ttmemory.pas @@ -65,6 +65,7 @@ interface uses TTTypes; {$I TTCONFIG.INC} +{$R-} type TMarkRecord = record diff --git a/components/lazutils/ttobjs.pas b/components/lazutils/ttobjs.pas index 288d741fd7..dd3e23e293 100644 --- a/components/lazutils/ttobjs.pas +++ b/components/lazutils/ttobjs.pas @@ -82,6 +82,7 @@ interface {$mode Delphi} {$I TTCONFIG.INC} +{$R-} uses LazFreeType, TTTypes,