Table of Contents

Method CoerceFontParams

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

CoerceFontParams(FontParams)

Adjusts the specified font parameters to ensure they conform to expected values.

public static void CoerceFontParams(IFontHandler.FontParams prm)

Parameters

prm IFontHandler.FontParams

The font parameters to coerce. The IFontHandler.FontParams object must specify the font size, unit, and optionally the font family or generic family.

Remarks

This method ensures that the font size is converted to points if it is specified in a different unit, and that a default font family is assigned if both the generic family and specific family name are null. Additionally, the font size is validated to ensure it falls within acceptable bounds.