Constructor EmbeddedFontReference
EmbeddedFontReference(string, string, Guid, int, FontStyle, int, Panose?)
Initializes an embedded font reference.
public EmbeddedFontReference(string familyName, string relationshipId, Guid fontKey, int weight, FontStyle style, int stretch = 5, Panose? panose = null)
Parameters
familyNamestringThe logical family name declared in
w:font/@w:name.relationshipIdstringThe relationship id targeting the binary embedded font part.
fontKeyGuidThe ODTTF GUID key used to de-obfuscate the first 32 bytes.
weightintThe style weight (typically 400 or 700).
styleFontStyleThe style slant.
stretchintThe width class (1-9, typically 5).
panosePanose?An optional PANOSE hint from
w:panose1.
Exceptions
- ArgumentNullException
familyNameorrelationshipIdis null.- ArgumentException
familyNameorrelationshipIdis empty or whitespace.- ArgumentOutOfRangeException
weightorstretchis outside its supported range.