Mega Code Archive

 
Categories / Delphi / Examples
 

Is font X installed

Title: is font "X" installed? Question: how to determine if a font is installed Answer: Xtremely easy with Delphi (as usual) You can just use this function, or put the code directly wherever you need it FontInstalled(Const FontName:String):Boolean; Begin Result:=Screen.Fonts.IndexOf(FontName)=0 End; then just call it If Not (FontInstalled('Pilobolus')) Then Begin ShowMessage('Pilobolus font is not installed!') //you can do stuff here to install it, or whatever you need... End; ...There's an article here on Delphi3000 (do a search for "FONTS") to include your fonts as resources, so you can include your custom fonts, then install'em on the user end keep up coding EberSys