Click to See Complete Forum and Search --> : Help with fonts
Shoke
Jan 9th, 2001, 11:51 AM
Hi,
I have a bunch of cool fonts in my program which i want to
distribute with the game, or else other computers can't
view them. I used Package and Deployment wizard to add the
fonts to my setup program, but when i setup and ran the program, the fonts still din't appear properly.
What can i do?
Thanks
PJB
Jan 9th, 2001, 01:59 PM
I've never tried anything like that, but do the fonts have to goto a paticular directory in order to read them? Like my default font folder is C:\winnt\fonts
Like i say, i have no idea but it's a thought
Shoke
Jan 9th, 2001, 03:23 PM
the font files are copied to c:\windows\fonts, which should be right. How can i register the fonts on the user's computer?
Arcom
Jan 9th, 2001, 08:18 PM
This should be simple, just use the AddFontResource API...
Public Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
Simply pass a font filename to lpFileName.
For example, to add Arial font, do this:
Dim lRet&
lRet& = AddFontResource("c:\windows\fonts\arial.ttf")
NOTE: I haven't tried this myself, but I don't see any reason why this should not work.
Arcom
Jan 9th, 2001, 08:27 PM
Me again :)
I've just found something at the MSDN Libray page(s).
Here's the link, check it out:
http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/gdi/fontext_9r51.htm
Shoke
Jan 10th, 2001, 03:56 PM
THanks
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.