|
| is font "X" installed? | 
|
|---|
Product: Delphi all versions | Category: VCL-General | Skill Level:
 | Scoring:  | Last Update: 08/23/2004 | Search Keys: delphi delphi3000 article borland vcl code-snippet font fonts determine detect install installed | Times Scored: 4 | Visits: 2954 | Uploader: Eber Irigoyen Company: BTXSys | Reference: N/A | | | Question/Problem/Abstract:
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
|
|
|
| |
Sign up to consume product discounts for Bronze memberships !
|
|
| |
Community Ad of L. Rosenstein |
|
| |
|
|
|