mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 19:09:38 +02:00
Renames the FreeType define DEBUG to FREETYPE_DEBUG because the previous name was too common
git-svn-id: trunk@35693 -
This commit is contained in:
parent
c65328d7bc
commit
54c7e0d2bb
@ -383,7 +383,7 @@ var
|
||||
(* UNLOCK *)
|
||||
|
||||
(* Element wasn't found !! *)
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
{$ENDIF}
|
||||
exit;
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
(* This file contains several definition pragmas that are used to *)
|
||||
(* build several versions of the library. Each constant is commented *)
|
||||
|
||||
(* Define the DEBUG constant if you want the library dumping trace *)
|
||||
(* Define the FREETYPE_DEBUG constant if you want the library dumping trace *)
|
||||
(* information to the standard error output. *)
|
||||
{ $DEFINE DEBUG}
|
||||
{ $DEFINE FREETYPE_DEBUG}
|
||||
|
||||
|
||||
(* Define the ASSERT constant if you want to generate runtime integrity *)
|
||||
|
@ -252,7 +252,7 @@ const
|
||||
|
||||
if ( n_contours > left_contours ) then
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Writeln( 'ERROR: Glyph index ',i,' has ',Gl.numberOfContours );
|
||||
Writeln( ' contours > left ', left_contours );
|
||||
{$ENDIF}
|
||||
@ -272,7 +272,7 @@ const
|
||||
|
||||
for k := 0 to n_contours-1 do
|
||||
begin
|
||||
{$IFDEF DEBUG} Write( n_points,' '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write( n_points,' '); {$ENDIF}
|
||||
n_points := GET_Short;
|
||||
exec^.pts.conEnds^[k] := n_points;
|
||||
inc( n_points );
|
||||
@ -280,7 +280,7 @@ const
|
||||
|
||||
if n_points > left_points then
|
||||
begin
|
||||
{$IFDEF DEBUG} Writeln( 'ERROR: Too many points' ); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln( 'ERROR: Too many points' ); {$ENDIF}
|
||||
error := TT_Err_Too_Many_Points;
|
||||
goto Fail;
|
||||
end;
|
||||
@ -302,11 +302,11 @@ const
|
||||
else }
|
||||
begin
|
||||
|
||||
{$IFDEF DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF}
|
||||
|
||||
if n_ins > face^.maxProfile.maxSizeOfInstructions then
|
||||
begin
|
||||
{$IFDEF DEBUG} Writeln('Too many instructions'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Too many instructions'); {$ENDIF}
|
||||
error := TT_Err_Too_Many_Ins;
|
||||
goto Fail;
|
||||
end;
|
||||
@ -515,11 +515,11 @@ const
|
||||
TT_Forget_Frame;
|
||||
|
||||
(* load the instructions *)
|
||||
{$IFDEF DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF}
|
||||
|
||||
if n_ins > exec^.face^.maxProfile.maxSizeOfInstructions then
|
||||
begin
|
||||
{$IFDEF DEBUG} Writeln('Too many instructions'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Too many instructions'); {$ENDIF}
|
||||
error := TT_Err_Too_Many_Ins;
|
||||
goto Fail;
|
||||
end;
|
||||
@ -732,7 +732,7 @@ const
|
||||
table := LookUp_TrueType_Table( face, 'glyf');
|
||||
if table < 0 then
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Trace1( 'TTApi.load_glyph : couldn''t find glyf table' );
|
||||
{$ENDIF}
|
||||
error := TT_Err_Table_Missing;
|
||||
@ -871,7 +871,7 @@ const
|
||||
|
||||
TT_Forget_Frame;
|
||||
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Writeln('Glyph ', i );
|
||||
|
||||
Writeln(' # of Contours : ',num_contours );
|
||||
@ -882,7 +882,7 @@ const
|
||||
|
||||
if num_contours > left_contours then
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Writeln( 'ERROR: Glyph index ', i, ' has ', num_contours );
|
||||
Writeln(' contours > left ', left_contours );
|
||||
{$ENDIF}
|
||||
|
@ -193,7 +193,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_Directory := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('Directory '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('Directory '); {$ENDIF}
|
||||
|
||||
if Load_TrueType_Collection(face) then
|
||||
begin
|
||||
@ -235,7 +235,7 @@ uses TTError, TTMemory, TTFile;
|
||||
tableDir.entrySelector := GET_UShort;
|
||||
tableDir.rangeShift := GET_UShort;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF}
|
||||
|
||||
TT_Forget_Frame;
|
||||
|
||||
@ -243,7 +243,7 @@ uses TTError, TTMemory, TTFile;
|
||||
if (tableDir.version <> $10000 ) and (* MS fonts *)
|
||||
(tableDir.version <> $74727565) then (* Mac fonts *)
|
||||
begin
|
||||
{$IFDEF DEBUG} Writeln('Invalid font format'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Invalid font format'); {$ENDIF}
|
||||
error := TT_Err_Invalid_File_Format;
|
||||
exit;
|
||||
end;
|
||||
@ -268,7 +268,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_Directory := Success;
|
||||
end;
|
||||
@ -295,7 +295,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
Load_TrueType_MaxProfile := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('MaxProfile '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('MaxProfile '); {$ENDIF}
|
||||
|
||||
table := LookUp_Mandatory_Table( face, 'maxp');
|
||||
if table < 0 then exit;
|
||||
@ -370,7 +370,7 @@ uses TTError, TTMemory, TTFile;
|
||||
inc( maxContours, 4 );
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_MaxProfile := Success;
|
||||
end;
|
||||
@ -466,7 +466,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_Header := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('Header '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('Header '); {$ENDIF}
|
||||
|
||||
i := LookUp_Mandatory_Table(face, 'head');
|
||||
if i <= 0 then exit;
|
||||
@ -504,7 +504,7 @@ uses TTError, TTMemory, TTFile;
|
||||
Index_To_Loc_Format := GET_Short;
|
||||
Glyph_Data_Format := GET_Short;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('Units per EM : ',Units_Per_EM ); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('Units per EM : ',Units_Per_EM ); {$ENDIF}
|
||||
|
||||
end;
|
||||
|
||||
@ -512,7 +512,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_Header := Success;
|
||||
end;
|
||||
@ -549,7 +549,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_Metrics := Failure;
|
||||
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
if vertical then
|
||||
Write('vmtx ')
|
||||
else
|
||||
@ -593,7 +593,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
if num_shorts < 0 then
|
||||
begin
|
||||
{$IFDEF DEBUG} Writeln('!! More metrics than glyphs !\n'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('!! More metrics than glyphs !\n'); {$ENDIF}
|
||||
if vertical then error := TT_Err_Invalid_Vert_Metrics
|
||||
else error := TT_Err_Invalid_Horiz_Metrics;
|
||||
exit;
|
||||
@ -632,7 +632,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
TT_Forget_Frame;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_Metrics := Success;
|
||||
end;
|
||||
@ -660,7 +660,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_Metrics_Header := Failure;
|
||||
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
if vertical then
|
||||
Write('Vertical Header ')
|
||||
else
|
||||
@ -733,7 +733,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_Metrics_Header := Load_TrueType_Metrics( face, vertical );
|
||||
end;
|
||||
@ -765,7 +765,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
Load_TrueType_Locations := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('Locations '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('Locations '); {$ENDIF}
|
||||
|
||||
with face^ do
|
||||
begin
|
||||
@ -782,7 +782,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
numLocations := dirTables^[T].Length shr 2;
|
||||
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Writeln('Glyph locations # ( 32 bits offsets ) : ', numLocations );
|
||||
{$ENDIF}
|
||||
|
||||
@ -799,7 +799,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
numLocations := dirTables^[T].Length shr 1;
|
||||
|
||||
{$IFDEF DEBUG}
|
||||
{$IFDEF FREETYPE_DEBUG}
|
||||
Writeln('Glyph locations # ( 16 bits offsets ) : ', numLocations );
|
||||
{$ENDIF}
|
||||
|
||||
@ -814,7 +814,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_Locations := Success;
|
||||
end;
|
||||
@ -925,7 +925,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_CVT := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('CVT '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('CVT '); {$ENDIF}
|
||||
|
||||
(* the CVT table is optional *)
|
||||
|
||||
@ -935,7 +935,7 @@ uses TTError, TTMemory, TTFile;
|
||||
face^.cvt := nil;
|
||||
face^.cvtSize := 0;
|
||||
Load_TrueType_CVT := Success;
|
||||
{$IFDEF DEBUG} writeln('none'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} writeln('none'); {$ENDIF}
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -956,7 +956,7 @@ uses TTError, TTMemory, TTFile;
|
||||
TT_Forget_Frame;
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
Load_TrueType_CVT := Success;
|
||||
end;
|
||||
|
||||
@ -991,7 +991,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
Load_TrueType_CMap := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('CMaps '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('CMaps '); {$ENDIF}
|
||||
|
||||
t := LookUp_Mandatory_Table( face,'cmap' );
|
||||
if t < 0 then exit;
|
||||
@ -1050,7 +1050,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end; (* with face^ *)
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_CMap := Success;
|
||||
exit;
|
||||
@ -1117,7 +1117,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
Load_TrueType_Programs := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('Font program '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('Font program '); {$ENDIF}
|
||||
|
||||
(* The font program is optional *)
|
||||
|
||||
@ -1130,7 +1130,7 @@ uses TTError, TTMemory, TTFile;
|
||||
fontProgram := nil;
|
||||
fontPgmSize := 0;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('none in file'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('none in file'); {$ENDIF}
|
||||
end
|
||||
|
||||
else
|
||||
@ -1145,10 +1145,10 @@ uses TTError, TTMemory, TTFile;
|
||||
fontProgram^,
|
||||
fontPgmSize ) then exit;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded, ',fontPgmSize,' bytes'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded, ',fontPgmSize,' bytes'); {$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Write('CVT program '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('CVT program '); {$ENDIF}
|
||||
|
||||
t := LookUp_trueType_Table( face, 'prep' );
|
||||
|
||||
@ -1161,7 +1161,7 @@ uses TTError, TTMemory, TTFile;
|
||||
cvtProgram := nil;
|
||||
cvtPgmSize := 0;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('none in file'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('none in file'); {$ENDIF}
|
||||
end
|
||||
|
||||
else
|
||||
@ -1176,7 +1176,7 @@ uses TTError, TTMemory, TTFile;
|
||||
cvtProgram^,
|
||||
cvtPgmSize ) then exit;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded, ',cvtPgmSize,' bytes'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded, ',cvtPgmSize,' bytes'); {$ENDIF}
|
||||
end;
|
||||
|
||||
Load_TrueType_Programs := Success;
|
||||
@ -1201,7 +1201,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_OS2 := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('OS/2 table '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('OS/2 table '); {$ENDIF}
|
||||
|
||||
(* We now support Apple fonts who do not have an OS/2 table *)
|
||||
table := LookUp_Mandatory_Table( face, 'OS/2' );
|
||||
@ -1271,7 +1271,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
end;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_TrueType_OS2 := Success;
|
||||
end;
|
||||
@ -1294,7 +1294,7 @@ uses TTError, TTMemory, TTFile;
|
||||
begin
|
||||
Load_TrueType_Postscript := Failure;
|
||||
|
||||
{$IFDEF DEBUG} Write('post table '); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Write('post table '); {$ENDIF}
|
||||
|
||||
table := LookUp_TrueType_Table( face, 'post' );
|
||||
if table < 0 then exit;
|
||||
@ -1317,7 +1317,7 @@ uses TTError, TTMemory, TTFile;
|
||||
|
||||
TT_Forget_Frame;
|
||||
|
||||
{$IFDEF DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
{$IFDEF FREETYPE_DEBUG} Writeln('loaded'); {$ENDIF}
|
||||
|
||||
Load_trueType_Postscript := Success;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user