Page 1 of 1

Install Font?

Posted: Sun Jun 27, 2004 5:18 am
by snap2000
Is it possible to install an available font in VB?

EDIT: This is going to be in Windows only... I'm still a beginner, so I didn't put it in the Windows forum... I think I've seen one...

Posted: Sun Jun 27, 2004 10:23 am
by GPI
VB or PB?

Posted: Sun Jun 27, 2004 4:09 pm
by thefool
isnt it just copying the font file to windows\font\

Posted: Sun Jun 27, 2004 5:49 pm
by GPI
one possibility. I think: Better is

Code: Select all

Procedure LoadAdditionalFont(File$)
  AddFontResource_(File$)
  ;SendMessage_(#HWND_BROADCAST,#WM_FONTCHANGE,0,0)
EndProcedure
Procedure UnLoadAdditionalFont(FontName$); NOT FILENAME!
  RemoveFontResource_(FontName$)
  ;SendMessage_(#HWND_BROADCAST,#WM_FONTCHANGE,0,0)
EndProcedure  

Posted: Sun Jun 27, 2004 6:28 pm
by thefool
My method works, but with gpi's method you can have the font installed and the uninstalled again, while its in your own decided path.

Posted: Sun Jun 27, 2004 8:32 pm
by GPI
thefool wrote:My method works, but with gpi's method you can have the font installed and the uninstalled again, while its in your own decided path.
For games: The better solutions. Maybe you need a "crazy" Font, but this font isn't usefull for word and co.

And RPGMaker 2K shows, that the "global" methode with the font-folder isn't the best. Every RPGMaker-Game must use the same font...

btw: Don't take fixed path for the font-folder. There exist API-Commands to find the folder (a Windows can also installed on z:\windows\)

GPI

Posted: Sun Jun 27, 2004 9:25 pm
by snap2000
Alright, so when I get the full version (yes, I'm definantly going to buy PB when I can) I'll have a good way to do it (GPI's), but until then I'm just going with Arial. :oops:

Thanks for your continuous support, PBers. :)

Posted: Sun Jun 27, 2004 10:06 pm
by thefool
@gpi: if i meant it to be windows\font i would have written "windows\font"
Withouth quotes i was pointing to the dir where windows is installed, and not an absolute path..

Posted: Tue Jun 29, 2004 5:05 pm
by GPI
thefool wrote:@gpi: if i meant it to be windows\font i would have written "windows\font"
Withouth quotes i was pointing to the dir where windows is installed, and not an absolute path..
the problem is: Where is the windows-folder, and how it is "called".

On win98 you can rename the folder without any problem. But there exit api-commands (search in the forum), to find the right pfad.

btw.: My "c:\program files\common files" is called "c:\Programme\Gemeinsame Dateien" (i use a german windows-version).

So: ALWAYS search a system-folder with api-commands!

Posted: Tue Jun 29, 2004 5:17 pm
by thefool
Thats why i have SRGet installed. An lib from rings that has several funcitons for getting info and also getting system paths.