ChartDirector 6.0 (C++ Edition)

Chart.testFont


Usage

bool testFont(const char *font, int fontIndex, double fontHeight, double fontWidth, double angle, char *buffer);

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.
buffer(Mandatory)A buffer to hold the result of the font loading test. The buffer should be at least 4096 bytes in size.

Return Value

None