Constructor FontKey
FontKey(string, int, int, FontStyle, Twips, Panose?)
Initializes a font key.
public FontKey(string familyName, int weight = 400, int stretch = 5, FontStyle style = FontStyle.Normal, Twips kerningThreshold = default, Panose? panose = null)
Parameters
familyNamestringThe requested family name.
weightintThe requested CSS-like weight class (1-1000; 400 normal, 700 bold).
stretchintThe requested width class (1-9; 5 normal).
styleFontStyleThe requested slant style.
kerningThresholdTwipsThe minimum em size (twips) at which kerning applies; zero disables kerning.
panosePanose?An optional requested PANOSE hint used by fallback resolution.
Exceptions
- ArgumentNullException
familyNameis null.- ArgumentException
familyNameis empty or whitespace.- ArgumentOutOfRangeException
weightorstretchis outside its supported range.