Amen Posted August 7, 2005 Share Posted August 7, 2005 I've got a gui that will use a Font that is not in %windir%\Fonts dir when prog starts copies the new font there but the font cannot be used! if i put the new font manual there works. Is there a registration that must be done to registry or to memory after copying the new font? I also tryied GUICtrlSetFont command with 'fontname' targeting the font adress without coping to %windir%\Fonts dir but didn't work. Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
GaryFrost Posted August 7, 2005 Share Posted August 7, 2005 you might try something like this.http://www.tucows.com/preview/384000you have to install the font. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Amen Posted August 7, 2005 Author Share Posted August 7, 2005 (edited) oh so quick reply! seems very nice font prog.You can preview the font etc but i need install a font programatically Nice logo you have. a have this wallpaper too and rulez! Edited August 7, 2005 by Amen Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
therks Posted August 7, 2005 Share Posted August 7, 2005 (edited) I remember a dllcall method that someone used to install a font.. lemme see if I can find it..Well I couldn't find the AutoIt script, but I found this API function: AddFontResourceI hate to pull a layer, but I don't know for sure if that will do what you're looking for, I have to get ready for work. Edited August 7, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Amen Posted August 7, 2005 Author Share Posted August 7, 2005 I cant' figure it out.I dont know thease staff!! Can anyone help here? $My_Fontname="Adventure Subtitles.ttf" ;------------------------------------------Copy the font file to Windows $msg=Filecopy(@SCRiptDir&"\"&$My_Fontname,@WindowsDir&"\Fonts",1) If $msg=0 then MsgBox(48,"","Cannot install gui's font",3) Else _LoadFont($My_Fontname);------------------------------------------Load font eNDiF Exit Func _LoadFont($Fontname) $gdi32=DllOpen ("Gdi32") If $gdi32=-1 then MsgBox(0,"DLLcall","unable Load Gdi32") ;MsgBox(0,"DLLcall",$Gdi32) $msg = DllCall($gdi32, "int", "AddFontResource", "str", $Fontname) If @error=1 Then MsgBox(0,"DLLcall","unable to use the DLL file") If @error=2 Then MsgBox(0,"DLLcall","unknown return type") DllClose ($gdi32) Return $msg EndFunc Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
Somerset Posted August 7, 2005 Share Posted August 7, 2005 i just added a new font with a silly name and tracked it down in the registry. remmber i am running windows 2000. !y2kbug is the name of the font. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts the type of key is REG_SZ the name and data are the same name, the font name of course. with llabeling of (TrueType) at the end of the name. example below "!Y2KBUG (TrueType)"="!Y2KBUG.TTF" Link to comment Share on other sites More sharing options...
Amen Posted August 7, 2005 Author Share Posted August 7, 2005 Tell me it was so simple! I'll try it when i can.. Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
GaryFrost Posted August 7, 2005 Share Posted August 7, 2005 would require beta, haven't tested Func _LoadFont($Fontname) $s_p = DllStructCreate("char[" & StringLen($Fontname) + 1 & "]") If @error Then Return @error EndIf DllStructSetData($s_p, 1, $Fontname) $msg = DllCall("gdi32.dll", "int", "AddFontResource", "ptr", DllStructGetPtr($s_p)) DllStructDelete($s_p) If @error = 1 Then MsgBox(0, "DLLcall", "unable to use the DLL file") If @error = 2 Then MsgBox(0, "DLLcall", "unknown return type") Return $msg[0] EndFunc ;==>_LoadFont SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Amen Posted August 8, 2005 Author Share Posted August 8, 2005 Can't make smthing to work.Worked with 2 above ideas Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
heath99 Posted September 13, 2005 Share Posted September 13, 2005 Can't make smthing to work.Worked with 2 above ideas <{POST_SNAPBACK}>It works - see the following that is fleshed out. Remmeber, you need the beta to make it work.FileInstall("C:\temp\BADABB__.TTF", "C:\windows\fonts") _LoadFont("BADABB__.TTF") Func _LoadFont($Fontname) $s_p = DllStructCreate("char[" & StringLen($Fontname) + 1 & "]") If @error Then Return @error EndIf DllStructSetData($s_p, 1, $Fontname) $msg = DllCall("gdi32.dll", "int", "AddFontResource", "ptr", DllStructGetPtr($s_p)) DllStructDelete($s_p) If @error = 1 Then MsgBox(0, "DLLcall", "unable to use the DLL file") If @error = 2 Then MsgBox(0, "DLLcall", "unknown return type") Return $msg[0] EndFunc ;==>_LoadFont Link to comment Share on other sites More sharing options...
Amen Posted September 19, 2005 Author Share Posted September 19, 2005 Perhaps something going wrong with the font i'm trying to install.I have the beta.Anyway thank u very much for the help Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now