mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-12 05:10:28 -05:00
Resolve #154
This commit is contained in:
parent
af80b2bbe9
commit
204ae425c0
@ -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;
|
||||||
|
@ -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,9 +150,22 @@ 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;
|
||||||
|
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
|
If DirectoryExists(path + 'UpChars') then
|
||||||
FFonts.LoadFont('UpChars', true); // shadow
|
FFonts.LoadFont('UpChars', true); // shadow
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user