mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-07 10:40:19 -05:00
Resolve #154
This commit is contained in:
parent
af80b2bbe9
commit
204ae425c0
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user