Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Add Font plugin

Author
Message
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 25th Jun 2007 22:22 Edited at: 25th Jun 2007 22:26
I have created a new plugin. It only has one command in it.



This will enable you to put a standard ttf font in a directory with your game and register it for use only while the game is executing. It will not put it in the system fonts directory.

The reason I have not included it with my D3Dfunc plugin is the fact that due to the nature of the command, it only works with Windows 2000 upwards.

Sample code plus a font is included along with help files.

Hope this proves useful as I couldn't see anyone having made something like this before.

At some point I will be adding the installation and source on my web site. For now I Attach it to this post.

Just unzip to your Dark Basic Professional folder.

D3DFunc - Superfast Antialiased text & much much more

Attachments

Login to view attachments
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jun 2007 23:40 Edited at: 25th Jun 2007 23:46
Wow Cloggy thanks for making this! I was just thinking of using custom fonts in my game but I was too lazy to do the whole install thing or use a bitmap font. Thanks for this command, I plan on using it at some point in one of my games. Downloading


EDIT: The D3D_TEXT command example doesn't seem to be working. I get that generic error that says the program needs to close

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 26th Jun 2007 00:26
Does this do something similar to IanMs various posts doing things with windows dlls?

http://forum.thegamecreators.com/?m=forum_view&t=63687&b=1

What does it do if you specify a custom font in game folder that already exists in windows?

Boo!
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 26th Jun 2007 01:17 Edited at: 26th Jun 2007 01:17
Sixty Squares,

Have you got the latest version of D3DFunc v3.6.5?

spooky,

It would appear it does, the reason I didn't spot this earlier is that I was Searching for AddFontResourceEx rather than just AddFontResource.

The difference is that AddFontResourceEx allows you to register the font purely for the current process. It is not registered in the system. Therefore no other application can use it.

D3DFunc - Superfast Antialiased text & much much more
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 26th Jun 2007 01:40 Edited at: 26th Jun 2007 01:41
Sixty Squares

Are you remembering to use d3d_starttext and d3d_endtext?

Login to post a reply

Server time is: 2024-11-25 04:07:46
Your offset time is: 2024-11-25 04:07:46