FontPointHeight - DfBaseWindow

Represents the height of an object in points. Suggested mechanism for getting and setting font heights.

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: None

Syntax
 Property Integer FontPointHeight

Read Access: Get FontPointHeight to IntegerVariable
Write Access: Set FontPointHeight to IntegerVariable/Value


Description

Represents the height of an object in points. Windows will set the width based on this height. Using this propery is the suggested mechanism for getting and setting font heights.

We recommend using Windows system fonts by setting pbUseWindowsFont to True. Read Understanding Fonts in DataFlex for a more information.


Using Custom Fonts

Normally, you will not set custom font attributes and just use the defaults provided by windows. This provides the greatest portability. If you do wish to set custom font attributes, use Typeface, FontPointHeight, FontWeight, FontUnderline and FontItalics.

The advantages of FontPointHeight are:
- It's a real, known, sensible unit, which everyone else uses.
- The same metric (1/72 logical inch) is applied to all fonts.
- It scales with different resolutions and DPI.

Set fonts in controls and not their containers. This makes everything easier to model and to understand. If you need to set the same font in multiple controls, consider using a subclass.

If you want the control to resize based on the font, use the font interface (e.g., FontWeight). If you want the control to stay the same size, use the form_font interface (Form_FontPointHeight, Form_Typeface, Form_FontWeight, Form_FontItalics, Form_FontUnderline). Many of these are considered obsolete, mainly to discourage mixing these with the non-obsolete font properties listed above.


Obsolete Font Properties


Do not mix current and obsolete font properties. The obsolete font properties are FontSize, Physical_FontSize, Form_TypeFace, Form_FontFormHeight, Form_FontHeight, Form_FontItalics, Form_FontUnderline, Form_FontWeight.