Set custom fonts

GroupDocs.Viewer provides the feature to add custom font sources.

Following code snippet shows how to set a custom font source.

    FolderFontSource fontSource = new FolderFontSource("C:\\custom_fonts", SearchOption.TOP_FOLDER_ONLY);
    FontSettings.setFontSources(fontSource);

    try (Viewer viewer = new Viewer("sample.docx")) {
        HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
        viewer.view(viewOptions);
    }