This commit is contained in:
Merlijn Wajer 2010-04-29 19:21:56 +02:00
parent af80b2bbe9
commit 204ae425c0
2 changed files with 18 additions and 2 deletions

View File

@ -214,9 +214,9 @@ begin
F.Name := F.Name + '_s';
f.Data := InitOCR( LoadGlyphMasks(FPath + Name + DS, Shadow));
Fonts.Add(f);
{$IFDEF FONTDEBUG}
{{$IFDEF FONTDEBUG}
TClient(Client).Writeln('Loaded Font ' + f.Name);
{$ENDIF}
{$ENDIF} }
end;
function TMFonts.LoadSystemFont(const SysFont: TFont; const FontName: string): boolean;

View File

@ -140,6 +140,9 @@ function TMOCR.InitTOCR(const path: string): boolean;
var
dirs: array of string;
i: longint;
{$IFDEF FONTDEBUG}
fonts_loaded: String = '';
{$ENDIF}
begin
// We're going to load all fonts now
FFonts.Path := path;
@ -147,8 +150,21 @@ begin
Result := false;
for i := 0 to high(dirs) do
begin
{$IFDEF FONTDEBUG}
// REMOVING THIS WILL CAUSE FONTS_LOADED NOT BE ADDED SOMEHOW?
writeln('Loading: ' + dirs[i]);
{$ENDIF}
if FFonts.LoadFont(dirs[i], false) then
begin
fonts_loaded := fonts_loaded + dirs[i] + ', ';
result := true;
end;
end;
if length(fonts_loaded) > 2 then
begin
writeln(fonts_loaded);
setlength(fonts_loaded,length(fonts_loaded)-2);
TClient(Self.Client).WriteLn('Loaded fonts: ' + fonts_loaded);
end;
If DirectoryExists(path + 'UpChars') then
FFonts.LoadFont('UpChars', true); // shadow