Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
llSucess = InstallSystemFont("path\filename.TTF")
PROCEDURE InstallSystemFont()
LPARAMETERS lcFontLocFile
LOCAL lnNumFontsAdded
DECLARE INTEGER AddFontResource IN GDI32.DLL ;
STRING @ lpszFileName
DECLARE INTEGER SendMessage IN USER32.DLL ;
INTEGER hWnd, ;
INTEGER Msg, ;
INTEGER wParameter, ;
INTEGER lParameter
#DEFINE HWND_BROADCAST 0xFFFF
#DEFINE WM_FONTCHANGE 0x001D
lnNumFontsAdded=AddFontResource(lcFontLocFile)
IF lnNumFontsAdded > 0
*\\Font added sucessfully, send notification to Windows so apps get updated
=SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0)
RETURN .T.
ELSE
*\\Unable to add font
RETURN .F.
ENDIF
ENDPROC
craigsboyd said:So the difference is that calling the AddFontResource as above makes the font available UNTIL Windows is rebooted, copying the Font to the Fonts folder makes it available AFTER windows is rebooted, and copying it and then calling AddFontResource makes the Font available immediately and also after Windows is rebooted (obviously AddFontResource doesn't need to be called again after the first reboot as Windows will have already searched it's Fonts directory and added the new font to the internal fonts table it holds).
When Mike posted that I checked and found that I had 188 fonts installed. I'm not a desktop publisher or anything, but I've installed a few things on this old Win2000 box. I can't imagine having 1000 fonts... especially after learning that Windows loads all of them in memory upon startup.MikeLewis said:I can't imagine anyone wanting to install anywhere near as many fonts as that -- not even a graphics or DTP professional.