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.

DarkBASIC Professional Discussion / Using a custom font

Author
Message
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 2nd Nov 2015 20:17
I have downloaded a custom font (can be used for commercial too), how can I load it in my project? The file is ttf
Attila
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 2nd Nov 2015 21:25
Install the font with the font-management of windows (right click the .ttf-file choose install and its done). Now you can use the font by its name in DarkBasic
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 2nd Nov 2015 22:11
Yes but I need to distribute the font as I will be selling the game, it must work on other computers too
SamKM
14
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 2nd Nov 2015 22:17
Check out IanM's post here:
https://forum.thegamecreators.com/thread/63687#msg700062
Works great for me
The code never bothered me anyway...
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 2nd Nov 2015 22:47
Thank you!
The only thing that is not very clear is the Unload thing, when do I have to call it? when I quit the program? If the game crashes then it will be a problem too.
What happens also if the font stay registered? Is that a real problem?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 3rd Nov 2015 23:58 Edited at: 4th Nov 2015 00:02
I've been using this method by WickedX, works great in xp, 7, and 10

https://forum.thegamecreators.com/thread/214323#msg2561099

Nevermind, looks like it is the same.

You only need to unload it if the fonts licencing terms state it cant be left permanently installed on user systems

Login to post a reply

Server time is: 2024-03-29 10:58:24
Your offset time is: 2024-03-29 10:58:24