Nutrient Web SDK

ReferenceFontSubstitution

Type Alias FontSubstitution

Describes the fonts that you would like to substitute in a document and the fonts you would like to use for that substitution

Patterns are matched using the following rules:

  • * matches multiple characters.
  • ? matches a single character.

Ordering matters - As names could match multiple patterns, it's important to note that the order of the patterns matters. Case-insensitive - Both the pattern and the target name are case-insensitive.

Type Alias

Example

Substitute all Noto fonts found in the document with AwesomeFont


const myFontsSubstitutions = [{
pattern: "Noto*",
target: "AwesomeFont"
}]

NutrientViewer.load({
//...
fontSubstitutions: myFontsSubstitutions,
})

Properties

string

The font you would like to be substituted.

string

The font you would like to substitute the "from" font with.