Load custom fonts

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

On this page

GroupDocs.Comparison allows you to compare documents that contains non-standard fonts.

To connect custom fonts and compare documents, follow these steps:

  1. Instantiate the LoadOptions object. Specify a list of directories with custom fonts.
  2. Instantiate the Comparer object with source document path or stream and the LoadOptions object created in the previous step.
  3. Call the Add method. Specify the target document path or stream.
  4. Call the Comparer method.

The following code snippet shows how to connect custom fonts and compare documents:

using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...

// Instantiate the LoadOptions object and create a list of custom font directories.
LoadOptions loadOptions = new LoadOptions();
loadOptions.FontDirectories.Add("./fontPath/");

using (Comparer comparer = new Comparer("source.docx", loadOptions))
{
    comparer.Add("target.docx");
    comparer.Compare("result.docx");
}

See also

On this page