Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Adding a font to windows


7 replies to this topic

scott matthews2

scott matthews2
  • Members
  • 13 posts

Posted 24 January 2002 - 17:23

I need to add a font to windows in my installation.  Currently, I have the fonts going to <WinDIR>\fonts.  They make the trip here just fine.

The problem I am having is that Windows programs do not recognize that the newly added fonts are in the <WinDir>\fonts area until I go into Control Panel and then double click on the fonts folder.

Is there a way to get around this.  The above occurs in win98, winnt, & windows 2000.

Thanks


ckilishtof

ckilishtof
  • Members
  • 6 posts

Posted 25 January 2002 - 14:55

Fonts need to be registered.
You can register them at install time using RegDBSetKeyValueEx.

Win9x Example:
RegDBSetKeyValueEx('SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts', 'Tahoma (TrueType)',REGDB_STRING,'tahoma.ttf', -1)

Win NT Example:
RegDBSetKeyValueEx('SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts', 'Tahoma (TrueType)',REGDB_STRING,'tahoma.ttf', -1)

(Edited by ckilishtof at 8:57 am on Jan. 25, 2002)

(Edited by ckilishtof at 3:34 pm on Jan. 31, 2002)


umbe2k1

umbe2k1
  • Members
  • 8 posts

Posted 31 January 2002 - 17:13

refer to my recent post, there's the solution
i've already tried it

bye, 2k1_experience


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 31 January 2002 - 18:34

You have to use
Code Sample
RegDBSetKeyValueEx('SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts', 'Tahoma (TrueType)',REGDB_STRING,'tahoma.ttf', -1)

Win9x does not have Windows NT registry keys ...


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 31 January 2002 - 20:51

Yeah, that was obviously a copy/paste problem.

scott matthews2

scott matthews2
  • Members
  • 13 posts

Posted 02 February 2002 - 04:29

Thanks for the information.

This gets the fonts "registered" in the registry, but requires a reboot for the new fonts to be available for applications.

Is the needed "reboot" a given or is there a way to make the fonts immediately available after the registration in the registry by Installshield?

Thanks again.



Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 02 February 2002 - 15:41

You would think so since once can manually do it without rebooting.

Perotin

Perotin
  • Full Members
  • 407 posts

Posted 04 February 2002 - 14:30

What about telling all programs about the changes in registry?
Code Sample
   #define HWND_BROADCAST      0xFFFF
   #define WM_SETTINGCHANGE    0x001A

szEnv = "Environment";
Disable( LOGGING );
// Flush the NT registry to all applications.
pEnv = &szEnv;
SendMessage( HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv );
Enable( LOGGING );


(Edited by Perotin at 2:31 pm on Feb. 4, 2002)