Table of Contents

Method GetStyle

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

GetStyle(IFontHandler)

Determines the combined FontStyle based on the attributes of the specified font.

public static FontStyle GetStyle(IFontHandler font)

Parameters

font IFontHandler

An object implementing IFontHandler that provides font attributes such as weight, italic, underline, and strikethrough.

Returns

FontStyle

A FontStyle value representing the combination of font styles (e.g., Bold, Italic, etc.) that are applicable to the specified font. Returns Regular if no specific styles are applied.

Remarks

The returned FontStyle is a bitwise combination of applicable styles. For example, if the font is both bold and italic, the result will include both Bold and Italic.