FontSubstitutionContext

FontSubstitutionContext class

Describes a single font substitution that occurred while loading or rendering a source document. Instances are passed to OnFontSubstituted.

public sealed class FontSubstitutionContext

Constructors

Name Description
FontSubstitutionContext(string, string, string, string) Creates a new FontSubstitutionContext.

Properties

Name Description
OriginalFontName { get; } Name of the font referenced by the source document but unavailable to the conversion pipeline.
Reason { get; } The substitution message exactly as reported by the conversion pipeline, verbatim and unparsed. For documents that expose font names structurally this may be null (use OriginalFontName / SubstituteFontName); for others it carries the full human-readable description, which names both the missing and the substitute font.
SourceFileName { get; } File name of the source document being converted. When the source was provided as a stream that is not a FileStream, this contains a generated identifier rather than a real file name.
SubstituteFontName { get; } Name of the font used as a substitute. May be null for documents whose engine reports the substitution only as descriptive text — in that case read Reason.

See Also