TUIFont.CreateFromFile Method
Creates a font from a font file. 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 CreateFromFile(String aFontFilename, Double aSize, TUIFontStyle aFontStyle, Int32 aFontIndex)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
aFontFilename | String | Filename of the file 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 |