You can specify the default font name for a document. GroupDocs.Viewer uses this font during rendering instead of any not installed fonts. For example, if the document includes a font containing non-English characters, specify the default font name to ensure that GroupDocs.Viewer replaces any missing font with one which has the same character set.
The following code snippet shows how to set the default font name:
usingGroupDocs.Viewer;usingGroupDocs.Viewer.Options;// ...using(Viewerviewer=newViewer("missing_font.pptx")){// Create options for rendering HTML document with embedded resourcesHtmlViewOptionsviewOptions=HtmlViewOptions.ForEmbeddedResources();// Specify a default font name is the optionsviewOptions.DefaultFontName="Courier New";// Render input PPTX to output HTMLviewer.View(viewOptions);}
ImportsGroupDocs.ViewerImportsGroupDocs.Viewer.Options' ...
ModuleProgramSubMain(argsAsString())UsingviewerAsViewer=NewViewer("missing_font.pptx")' Create options for rendering HTML document with embedded resources
DimviewOptionsAsHtmlViewOptions=HtmlViewOptions.ForEmbeddedResources()' Specify a default font name is the options
viewOptions.DefaultFontName="Courier New"' Render input PPTX to output HTML
viewer.View(viewOptions)EndUsingEndSubEndModule
missing_font.pptx is the sample file used in this example. Click here to download it.