From e2712ad9a75e9f3f3390dc1973209ef569c78540 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Fri, 30 Apr 2010 23:25:15 +0200 Subject: [PATCH] Add LoadFont and FreeFont --- Units/MMLAddon/PSInc/Wrappers/ocr.inc | 12 ++++++++++++ Units/MMLAddon/PSInc/psexportedmethods.inc | 2 ++ 2 files changed, 14 insertions(+) diff --git a/Units/MMLAddon/PSInc/Wrappers/ocr.inc b/Units/MMLAddon/PSInc/Wrappers/ocr.inc index de943bb..c8ce773 100644 --- a/Units/MMLAddon/PSInc/Wrappers/ocr.inc +++ b/Units/MMLAddon/PSInc/Wrappers/ocr.inc @@ -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; + + diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index 4263505..ea2c787 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -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');