Merge branch 'master' of ssh://villavu.com:54367/simba

This commit is contained in:
Raymond 2010-05-01 15:00:33 +02:00
commit 038ab65706
3 changed files with 16 additions and 2 deletions

View File

@ -1390,8 +1390,8 @@ begin
FormWritelnEx('Warning: The font directory specified in the Settings isn''t valid. Can''t load fonts now');
Thread.SetPaths(ScriptPath,AppPath,Includepath,PluginPath,fontPath);
if selector.haspicked then Thread.Client.IOManager.SetTarget(Selector.LastPick);
if selector.haspicked then
Thread.Client.IOManager.SetTarget(Selector.LastPick);
loadFontsOnScriptStart := (lowercase(LoadSettingDef('Settings/Fonts/LoadOnStartUp', 'True')) = 'true');
// Copy our current fonts

View File

@ -52,3 +52,15 @@ function ps_LoadSystemFont(const SysFont : TFont; const FontName : string) : boo
begin
result := CurrThread.Client.MOCR.Fonts.LoadSystemFont(SysFont,FontName);
end;
function ps_LoadFont(const FontName: string; shadow: boolean): boolean; extdecl;
begin
result := CurrThread.Client.MOCR.Fonts.LoadFont(FontName, shadow);
end;
function ps_FreeFont(const FontName: string): boolean; extdecl;
begin
result := CurrThread.Client.MOCR.Fonts.FreeFont(FontName);
end;

View File

@ -253,6 +253,8 @@ AddFunction(@ps_getTextAtEx,'function GetTextAtEx(const xs,ys,xe,ye, minvspacing
AddFunction(@ps_GetTextAtEx,'function GetTextAtExWrap(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing,color, tol: integer;const font: string): string;');
AddFunction(@ps_gettextATPA,'function GetTextATPA(const ATPA : T2DPointArray; const maxvspacing : integer; const font : string): string;');
AddFunction(@ps_LoadSystemFont,'function LoadSystemFont(const SysFont : TFont; const FontName : string) : boolean;');
AddFunction(@ps_LoadFont, 'function LoadFont(const FontName: string; shadow: boolean): boolean;');
AddFunction(@ps_FreeFont, 'function FreeFont(const FontName: string): boolean;');
{Bitmaps}
SetCurrSection('Bitmaps');