Sign in Join
FPDoc Onlineexperiment

TLCLTextMetric record

In unit Graphics

A record representing the physical dimensions of the currently selected font in the canvas.

Declaration

pascal
TLCLTextMetric = record

Description

The TLCLTextMetric record contains the elements Ascender, Descender and Height. Ascender and descender are relative to the baseline which is the line on which the characters are drawn. Ascender is the distance the characters extend above, descender is the distance they extend below the baseline. Empty space to the next line is included in these values. The height encloses the entire character, i.e. it is the sum of ascender and descender.

When the canvas methods TextOut or TextRect draw text at a point X,Y then Y is understood as the top of the characters. Therefore, the baseline is located below Y by the amount of ascender pixels, i.e. at position Y + Ascender.

Fields

AscenderThe distance a character extends above the baseline.
DescenderThe distance a character extends below the baseline
HeightEntire character height, sum of ascender and descender.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.