Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, TipmyPip), 1,333 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 3 of 3 1 2 3
Re: Font installing dll - My Christmas present for [Re: clone45] #171871
02/03/08 17:33
02/03/08 17:33
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline OP
Serious User
PadMalcom  Offline OP
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Try:
var dll_handle;
STRING* Pristina = "Pristina.TTF";
dllfunction InstallFont(MyFont);

void main()
{
dll_handle = dll_open("FontInstall.dll");
InstallFont(Pristina);

If that does not work, I'm afraid I can't help you...

Re: Font installing dll - My Christmas present for [Re: clone45] #171872
02/03/08 17:38
02/03/08 17:38
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline
User
clone45  Offline
User

Joined: Mar 2002
Posts: 580
San Francisco
Nevermind! Here's how to load and use a TTF font using lite-c with no .dll:

Step #1: Place the font in your game directory.

Step #2: At the top of your main script, make sure that you include windows.h:

#include <windows.h>;

Step #3: I'm not sure if this step is necessary or perfectly correct, but add the following to your main loop:

void main()
{
...
AddFontResource("Pristina.TFF");
}

Step #4: Include the font in on of your panels

FONT* mission_font = "Pristina#30";

TEXT* mission_text =
{
layer = 96;
pos_x = 10;
pos_y = 10;
size_y = 40;
offset_y = 0;
string (mission_text_string);
font = mission_font;
}

I just got this working 5 minutes ago, so I'm no expert at it. However, I wanted to share my thoughts with other lite-c programmers.

Thanks
- Bret

Page 3 of 3 1 2 3

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