1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-02-12 05:10:28 -05:00
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.Name := F.Name + '_s';
f.Data := InitOCR( LoadGlyphMasks(FPath + Name + DS, Shadow)); f.Data := InitOCR( LoadGlyphMasks(FPath + Name + DS, Shadow));
Fonts.Add(f); Fonts.Add(f);
{$IFDEF FONTDEBUG} {{$IFDEF FONTDEBUG}
TClient(Client).Writeln('Loaded Font ' + f.Name); TClient(Client).Writeln('Loaded Font ' + f.Name);
{$ENDIF} {$ENDIF} }
end; end;
function TMFonts.LoadSystemFont(const SysFont: TFont; const FontName: string): boolean; function TMFonts.LoadSystemFont(const SysFont: TFont; const FontName: string): boolean;

View File

@ -140,6 +140,9 @@ function TMOCR.InitTOCR(const path: string): boolean;
var var
dirs: array of string; dirs: array of string;
i: longint; i: longint;
{$IFDEF FONTDEBUG}
fonts_loaded: String = '';
{$ENDIF}
begin begin
// We're going to load all fonts now // We're going to load all fonts now
FFonts.Path := path; FFonts.Path := path;
@ -147,8 +150,21 @@ begin
Result := false; Result := false;
for i := 0 to high(dirs) do for i := 0 to high(dirs) do
begin 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 if FFonts.LoadFont(dirs[i], false) then
begin
fonts_loaded := fonts_loaded + dirs[i] + ', ';
result := true; 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; end;
If DirectoryExists(path + 'UpChars') then If DirectoryExists(path + 'UpChars') then
FFonts.LoadFont('UpChars', true); // shadow FFonts.LoadFont('UpChars', true); // shadow