Nutrient Web SDK
    Preparing search index...

    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.

    Substitute all Noto fonts found in the document with AwesomeFont


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

    NutrientViewer.load({
    //...
    fontSubstitutions: myFontsSubstitutions,
    })
    type FontSubstitution = {
        pattern: string;
        target: string;
    }
    Index

    Properties

    Properties

    pattern: string

    The font you would like to be substituted.

    target: string

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