Gamestudio Links
Zorro Links
Newest Posts
How to buy tomorrow at open?
by frutza. 06/01/23 19:58
Adding Position to Current Trade
by AndrewAMD. 05/30/23 10:34
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
Return type of floor()
by AndrewAMD. 05/25/23 14:17
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (AndrewAMD), 1,065 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
fontExists.dll #252703
02/19/09 20:29
02/19/09 20:29
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi there,

I was a bit frustrated that I get no feedback from the engine if a font exists or not. So I searched a bit and wrote a little DLL. With this tiny DLL you can check if a specific font is available on the user's system.

The DLL works both for Lite-C -and- C-Script. There are two functions:

int fontInstalled (char* fontName); // Lite-C only
var fontInstalledStr (STRING* fontName); // C-Script compat.

Use the first one in your Lite-C app, the second one if you use C-Script. To define the DLL-function in your C-Script app, use

dllfunction fontInstalledStr (fontName);

In both cases make sure that the fontExists.dll has been found and loaded by the engine. The function returns 1 or 0, indicating if the font has been found or not.

EXAMPLES

Lite-C:

Code:
char* fontName = "Calibri";
int result_calibri = fontInstalled(fontName);
int result_tahoma = fontInstalled("Tahoma");


C-Script:

Code:
string fontName = "Cambria";
var result_cambria = fontInstalledStr(fontName);
var result_times = fontInstalledStr("Times New Roman");


You can use the DLL without permission for anything you want. DLL source and testcases included. If it blows up your machine, it is not my fault! DLL has been built with Visual Studio 2005.

DOWNLOAD: http://www.christian-behrenberg.de/download/fontExistsDll/fontExistsDll.zip

Donations are welcome! PayPal -> christian[ät]behrenberg[.]de

Bye bye,
Christian

Re: fontExists.dll [Re: HeelX] #263708
05/01/09 18:19
05/01/09 18:19

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Cool thing!
Thank you HeelX...


Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1