components/freetype/ttfile.pas contains the following function:
function TFreeTypeStream.ForgetFrame : TError;
begin
result := Failure;
if FCurrentFrame = nil then exit;
if FFrameSize > frame_cache_size then
FreeMem( FCurrentFrame, FFrameSize );
FFrameSize := 0;
FCurrentFrame := nil;
FFrameCursor := 0;
end;
As can be seen, it always returns failure. The following patch mimics the result assignment found in function TFreeTypeStream.AccessFrame( aSize : Int ) : TError; and in function TFreeTypeStream.ReadAtFile(APos: Long; var ABuff; ACount: Int): TError;
diff --git a/components/freetype/ttfile.pas b/components/freetype/ttfile.pas
index 88fb5ff995..96a87bd590 100644
--- a/components/freetype/ttfile.pas
+++ b/components/freetype/ttfile.pas
@@ -495,6 +495,8 @@ const
FFrameSize := 0;
FCurrentFrame := nil;
FFrameCursor := 0;
+
+ result := Success;
end;
(*******************************************************************