Function Reference
Page 437 of 860
GetFontWeight
Syntax:
SI32 pdfGetFontWeight(
const PPDF* IPDF) // Instance pointer
The function returns the weight that will be used to emulate a bold font style. See SetFontWeight()
for further information.
Font weights:
•
100 - 300
// Ultra light, Light
•
400 - 500
// Standard
•
600 - 1000 // Bold, Extra bold
GetFTextHeight
Syntax:
double pdfGetFTextHeight(
const PPDF* IPDF,
// Instance pointer
TTextAlign Align,
// Base text alignment
const char* AText) // Formatted text
typedef enum
{
taLeft,
taCenter,
taRight,
taJustify
}TTextAlign;
The function measures the height of a formatted text block. Before calling this function a font (see
SetFont()) and the output rectangle must be set with the function SetTextRect(). The parameter
Height of SetTextRect() should be set to -1 to avoid page breaks. Otherwise the height of the first text
block is returned that fits into the given height of the rectangle.
The parameter AText must contain the same text (incl. format tags if any) as which should be
printed later with WriteFText().
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is the height of the formatted text block. If the function fails
the return value is a negative error code.