#74579 - 2003-04-17 05:27 PM
Adding a Font
|
SMeggs
Fresh Scripter
Registered: 2003-04-17
Posts: 5
Loc: London UK
|
I am trying to add a new Font to Windows 2000 Profesional SP3 clients.
I used to use
copy @lserver + "\netlogon\*.ttf" "c:\winnt\fonts" writevalue( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" , "Eni 1 (TrueType)" , "Eni1____.ttf" , "REG_SZ") writevalue( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" , "Eni 2 (TrueType)" , "Eni2____.ttf" , "REG_SZ") writevalue( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" , "Eni 3 (TrueType)" , "Eni3____.ttf" , "REG_SZ")
But it has now stopped working. The fonts are copied and shown in both the directory and Control panel Fonts screen. However no Application can use them.
Any idea's why this has stopped working ?
All clients have local admin privs.
Its as if something else needs to be kicked to validate the Fonts.
|
|
Top
|
|
|
|
#74580 - 2003-04-18 05:51 AM
Re: Adding a Font
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
SMeggs,
Welcome to the board!
I thought adding a new font was a simple matter of copying a .FOT or .TTF file to -
%WINDIR%\Fonts
You can then do an IF EXIST.. to check for it.
HTH,
Kent
|
|
Top
|
|
|
|
#74582 - 2003-04-18 07:56 AM
Re: Adding a Font
|
MightyR1
MM club member
   
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
On Wintendos I do this to update fonts, which works fine:
code:
$KeyFonts = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Fonts" $Fontdir = "i:\arr.alg\sysbeh\install\fonts\" ; Systeembeheerder kan dit aanpassen aan zijn netwerkomgeving $Font1 = $Fontdir + "beatrix.*" $Font2 = $Fontdir + "bert*.*" $Font3 = $Fontdir + "uto*.*"
;########## FONTS ####################################################################################################
; Variablen vaststellen ; Fonts voor de huisstijl uit de registry van Windows verwijderen $RC = DelValue($KeyFonts, "Beatrix (TrueType)") $RC = DelValue($KeyFonts, "Berthold Imago Light (TrueType)") $RC = DelValue($KeyFonts, "Berthold Imago Light Italic (TrueType)") $RC = DelValue($KeyFonts, "Berthold Imago Medium (TrueType)") $RC = DelValue($KeyFonts, "Utopia (TrueType)") $RC = DelValue($KeyFonts, "Utopia Bold (TrueType)") $RC = DelValue($KeyFonts, "Utopia Italic (TrueType)") $RC = DelValue($KeyFonts, "Utopia SB Semi Bold (TrueType)")
$RC = SetFileAttr("c:\windows\fonts\beatrix.ttf",32) $RC = SetFileAttr("c:\windows\fonts\bertli.ttf",32) $RC = SetFileAttr("c:\windows\fonts\bertliit.ttf",32) $RC = SetFileAttr("c:\windows\fonts\bertme.ttf",32) $RC = SetFileAttr("c:\windows\fonts\utopbo.ttf",32) $RC = SetFileAttr("c:\windows\fonts\utopit.ttf",32) $RC = SetFileAttr("c:\windows\fonts\utopme.ttf",32) $RC = SetFileAttr("c:\windows\fonts\utopsbo.ttf",32) Del "%windir%\fonts\beatrix.*" Del "%windir%\fonts\bert*.*" Del "%windir%\fonts\uto*.*"
Copy $Font1 "%windir%\fonts\" /h Copy $Font2 "%windir%\fonts\" /h Copy $Font3 "%windir%\fonts\" /h
$RC = WriteValue($KeyFonts, "Beatrix (TrueType)", "beatrix.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Berthold Imago Light (TrueType)", "bertli.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Berthold Imago Light Italic (TrueType)", "bertme.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Berthold Imago Medium (TrueType)", "bertliit.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Utopia (TrueType)", "utopme_E.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Utopia Bold (TrueType)", "utopbo_E.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Utopia Italic (TrueType)", "utopit_E.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Utopia SB Semi Bold (TrueType)", "utopsboE.ttf", "Reg_SZ") $RC = WriteValue($KeyFonts, "Utopia Expert (TrueType)", "Utoexp_E.ttf", "Reg_SZ")
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
|
Top
|
|
|
|
#74592 - 2003-04-24 12:41 AM
Re: Adding a Font
|
SMeggs
Fresh Scripter
Registered: 2003-04-17
Posts: 5
Loc: London UK
|
First I would like to thank you all for the number of replies.
LONKERO
Your function call looks very interesting. Could you please expand on your information, i.e. what exact code I could use from my original posting and how do I call and return from the function. I have to apologise as I am not a programmer and a little more help is required.
Many thanks
Steve
|
|
Top
|
|
|
|
#74596 - 2003-04-24 11:50 AM
Re: Adding a Font
|
SMeggs
Fresh Scripter
Registered: 2003-04-17
Posts: 5
Loc: London UK
|
Sorry to be a pain but when I add any function call i.e. function InstallFont($source) +code ..... I get an error message from Kixtart "Script ERROR : unknown command.! Function InstallFont($source)" I get the same if I try to use the GUIcopy function call. It appears to make no difference where I place the function statements.
What stupid thing have I got wrong this time ??
Doh Steve
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 837 anonymous users online.
|
|
|