Table of Contents

Constructor EmbeddedFontReference

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

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

familyName string

The logical family name declared in w:font/@w:name.

relationshipId string

The relationship id targeting the binary embedded font part.

fontKey Guid

The ODTTF GUID key used to de-obfuscate the first 32 bytes.

weight int

The style weight (typically 400 or 700).

style FontStyle

The style slant.

stretch int

The width class (1-9, typically 5).

panose Panose?

An optional PANOSE hint from w:panose1.

Exceptions

ArgumentNullException

familyName or relationshipId is null.

ArgumentException

familyName or relationshipId is empty or whitespace.

ArgumentOutOfRangeException

weight or stretch is outside its supported range.