ChartDirector 6.0 (Perl Edition)

perlchartdir.testFont


Usage

testFont(font, fontIndex, fontHeight, fontWidth, angle)

Description

A diagnostic function to perform a font loading test.

From experience, the most common issue for font loading is unable to access server side fonts using anonymous user account for a web application, probably due to security restrictions. This diagnostic function can return the cause of problem to aid trouble-shooting.

Other uses of this function is to trace out where does ChartDirector search for the fonts, and the substitution font in case the request font is not available.

Arguments

ArgumentDefaultDescription
font(Mandatory)The font name. See Font Specification for details on various font attributes.
fontIndex(Mandatory)The font index if the font name refers to a font collection. An index of 0 means the first font.
fontHeight(Mandatory)The font height in points. This parameter will not affect font loading if the exact font exists, but will affect which substitution font to use if the font does not exist.
fontWidth(Mandatory)The font width in points. This parameter will not affect font loading if the exact font exists, but will affect which substitution font to use if the font does not exist.
angle(Mandatory)The rotation angle of the text. The angle is measured in degrees in clockwise direction. This parameter will not affect font loading if the exact font exists, but will affect which substitution font to use if the font does not exist.

Return Value

A text string showing the result of the font loading test.