Skip to content

# PDFFontSubstitution

Namespace: O2S.Components.PDF4NET.Rendering

Defines the rules for substituting fonts when rendering text.

    public class PDFFontSubstitution

Inheritance Object → PDFFontSubstitution

## Constructors

### PDFFontSubstitution()

Initializes a new PDFFontSubstitution object.

    public PDFFontSubstitution()

## Properties

### Mappings

Gets the font mappings dictionary.

    public Dictionary<string, Stream> Mappings { get; }

Property Value

Dictionary<String, Stream>
A dictionary that maps font names to corresponding TrueType font streams.

Remarks

The PDFFontSubstitution.Mappings property is used to specify font data streams for fonts that are not embedded in the PDF file.
The string key in the dictionary must corresponds to a font name (including the start /) in the PDF file. If that font is not embedded, the library will use the corresponding font stream to render the text.
The value /Default maps any non embedded font in the PDF file to a default font stream.