FontInstalled Method

 

Returns: An a boolean value indicating whether font fontName is installed. This is a convenience method used to determine whether the FontsInstalled property contains a specified font name.

 

Syntax:

bIsFontInstalled = bhObj.FontInstalled(fontName);

 

Note: You must call this method after the GetExtPropertiesEx method has been called. Otherwise the font detection will not have been performed yet.

 

Note: Unless you specify "all" in FontsToCheck, the font name passed into FontsInstalled must be a name in the FontsToCheck property. For example if FontsToCheck is equal to "arial, verdana, times", valid font names to use in the call to FontsInstalled are "arial", "verdana", and "times". If FontsToCheck is set to "all", then any font name can be used in the call to the FontInstalled method.

 

Tip: See the source for the BrowserHawk fontcheck.asp sample (\Program Files\cyScape\BrowserHawk\samples\ASP) for more details on detecting fonts with BrowserHawk and a full example.

 

Example:

<% set bhObj = Server.CreateObject("cyScape.browserObj")

bhObj.FontsToCheck = "verdana, arial, times"

bhObj.SetExtProperties "FontsInstalled"

bhObj.GetExtPropertiesEx

bVerdanaInstalled = bhObj.FontInstalled("verdana")

%>

<html> Arial installed? <% = bVerdanaInstalled %> </html>

 

See Also:

FontsInstalled Property