Table of Contents

TUIFont.CreateFromMemory Method

Creates a font from the font data. IMPORTANT NOTE: When using GDI+ (default in Windows), this method will create a FontCollection that can never be disposed until the application exits. When using GDI+, try not to use this method, or make sure that it is called only a couple of times since the memory for the loaded font won't be released. On the other hand, calling this method multiple times with the same font is ok, FlexCel will cache the font and not create multiple instances.

Syntax

Namespace: FlexCel.Core

public static TUIFont CreateFromMemory(Byte[] aFontData, Double aSize, TUIFontStyle aFontStyle, Int32 aFontIndex)

Parameters

<-> Parameter Type Description
aFontData Byte[] Byte array containing the ttf font data.
aSize Double Size in points of the font.
aFontStyle TUIFontStyle Style of the font (italic, bold, etc)
aFontIndex Int32 Index of the font

See also