Table of Contents

TUIFont.CreateSimilarFont Method

Creates a font which is the most similar to the one you specify. Some fonts don't have specific styles like italics or bold, if this is the case, this method will return the same font with a different style.

Syntax

Unit: FlexCel.Core

class function TUIFont.CreateSimilarFont(const FontName: string; const FontSize: Double; const FontStyle: Set of TUIFontStyle): TUIFont; static;

Parameters

<-> Parameter Type Description
const FontName string Name of the font we wish to create.
const FontSize Double Size in points of the font.
const FontStyle Set of TUIFontStyle Style of the font.

Returns

The font if it was possible to create it, or a similar one if it wasn't.

See also