GetVerticalTextHeight

Text

Description

Reports how far a run of text will travel down the page.

Syntax

Delphi

Function TPDFlib.GetVerticalTextHeight(Const FontName: WideString;
  Size: Double; Const Text: WideString): Double;

Parameters

FontNameAn installed face, by name.
SizeText size in points.
TextThe text to measure.

Return values

DistanceHow far the run travels, in points.
0The text or the face was empty, the size was not positive, or the face could not be read.

Remarks

Measures without drawing, so a column can be sized before it is committed to. A face carrying no vertical metrics of its own is measured at one em per character.

The measurement covers the forms that will actually be drawn, so a column whose brackets or vowel marks change shape vertically is measured as it will appear.

See also

DrawVerticalText, SetVerticalWritingMode, GetTextWidth