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.

Code Snippets / [DBP] - silent auto-install of distributed fonts as needed

Author
Message
Ortu
9
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 29th Apr 2015 06:08 Edited at: 29th Apr 2015 06:09
super simple method to check if your desired font is installed, and if not, will silently install it.

+ Code Snippet

It uses a little vbs helper script ('copy_font.vbs'):

+ Code Snippet

tested in XP and win7

DARKBASIC PRO 3d WORLD EDITOR
5
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 20th May 2015 10:23
If you have the d3d plugin then unremark then d3d commands


function Make2dBox(x,y,width,height,r,g,b)
rem if using d3d 2d
` d3d_color r/4,g/4,b/4,200
` d3d_box x,y,x+width,y+height
` d3d_color r,g,b,200
` d3d_box x+1,y+1,x+width-1,y+height-1
rem if using dbpro 2d
` ink rgb(r/4,g/4,b/4),1
` box x,y,x+width,y+height
` ink rgb(r,g,b),1
` box x+1,y+1,x+width-1,y+height-1
endfunction

- Infinity is Simplicity -
WickedX
8
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 31st May 2015 06:38
Haven't used Visual Basic Script in so long, I forgot it existed. These are the functions I use. It will check if the font exists on the users system. If the font is not present it will load the font and clean it from the system on exit. If the font exists on the user system it wont bother and just utilize the pre-existing font.

+ Code Snippet
Ortu
9
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 31st May 2015 19:25
handy!

Login to post a reply

Server time is: 2017-09-19 16:14:54
Your offset time is: 2017-09-19 16:14:54