FMX.Graphics.TFont.Size

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Size: Single read FSize write SetSize stored IsSizeStored nodefault;

C++

__property float Size = {read=FSize, write=SetSize, stored=IsSizeStored};

Properties

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

Description

The height of the font in points.

Use Size to specify the size of text. The size includes the ascent, above the baseline and the descent, below the baseline.

Font size is expressed in points, 72 per inch. With OS X, the point value is equivalent to pixels, because the display defaults to 72 dots (or pixels) per inch, or DPI. Windows text (at the DirectWrite API level) is sized with device-independent pixels or DIPs, at 96 per inch; and the display also defaults to 96 DPI. So, in both cases, there is a one-to-one correspondence between the font size units and display resolution. Text will be the same height on both Windows and OS X. (The way each platform renders fonts may cause subtle differences.)

For example, suppose the font's Size is 24. On Windows, 24 DIPs is 24/96 or 1/4 inches tall. 1/4-inch on a screen at 96 DPI is 24 pixels. On OS X, 24 points is 24/72 or 1/3 inches tall. 1/3-inch on a screen at 72 DPI is 24 pixels.

Text sized in points on Windows will appear larger at the same numeric value. For example, 24 points at 96 DPI is 32 pixels tall.

See Also


Code Examples