Fonts and Layout
A font name in a workbook does not prove that the matching face, the font file for one weight and style, is deployed or loaded. When the faces or their metrics differ, the browser display, AutoFit, chart labels and PDF output can differ too. Start from where you see the difference: in the browser, in the PDF or in the geometry of the worksheet.
The Browser Doesn't Load the Fonts
The editor loads its fonts through a font catalog, which lists the font families and their faces with URLs. ready resolves after the initial document fonts are loaded and rejects on failure. Check the browser side in this order:
- Await
readyand handle its rejection. - Inspect the catalog URL, its HTTP status, the final redirect location and the relative face URLs. Relative face URLs resolve against the final location of the catalog response.
- Confirm that the static files are deployed and that the MIME and CORS rules permit font requests.
- Check that the actual family, weight and style names match the document.
Instructions Ask for a Backend Font Service
The ASP.NET Core editor defaults to its own static catalog. A backend font service, which older instructions require, is not a prerequisite for the current editor package.
For a custom catalog, set the public option for it deliberately: FontCatalogURL of TXSheetControlOptions in Razor, fontCatalogURL in JavaScript and Angular. Custom Fonts shows how to host such a catalog.
Fonts Differ in the PDF
Check the fonts for document output:
- Keep the supported TrueType document faces available, including the regular, bold and italic variants the report uses.
- Use TrueType faces in the catalog. The default HTTP catalog accepts TrueType faces, and it rejects an entry that has WOFF2 faces only.
- For advanced explicit font descriptors, such as FontFaceDefinition, provide supported document font data separately where required.
- Check the discovery warnings and the glyph coverage.
The Server Doesn't Use the Browser's Fonts
The server's trusted font directory is not the browser's font URL. The two can contain matching bytes, but you configure them separately: the directory with FontDirectory of ServerSheetControlOptions in .NET or fontDirectory in Node.js, the URL with the catalog option of the editor.
After you change the fonts, refresh the server catalog where supported, with RefreshFontsAsync in .NET or refreshFonts in Node.js.
Wrapping, Row Heights or Page Counts Differ
Font substitution affects wrapping, widths, row heights and page counts, but it is not the only cause. Before you blame fonts alone, compare the explicit cell sizes, number formats, locale, print area, paper and scale.
Await font-sensitive AutoFit, and validate the final PDF, including non-English characters.