Vcl.Graphics.TFont.Height

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Height: Integer read GetHeight write SetHeight;

C++

__property int Height = {read=GetHeight, write=SetHeight, nodefault};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TFont

Description

Specifies the height of the font.

Use Height to specify the height of the font in pixels. If the value is negative, the internal leading that appears at the top of each line of text is not measured. If the value is positive, Height represents the height of the characters plus the internal leading.

To specify the size of the font in points, use the Size property instead. Users usually specify font size in points, while applications may be concerned with the actual size of the font in pixels when displaying the font on the screen.

The value of Height can be obtained from the point size using this formula:

Font.Height = -Font.Size * Font.PixelsPerInch / 72

When the Height property has a positive value, the Size property has a negative value. When the Size property has a positive value, the Height property has a negative value.

See Also