PdfUnicodeFont

Font configuration interface for PDF export with Unicode character support.

This interface defines the structure for providing custom TrueType fonts (TTF) to the PDF exporter. Custom fonts are required when exporting data that contains non-Latin characters, as the default Helvetica font only supports basic Latin characters.

Optional bold variant of the font for styling headers and emphasized text.

If provided, this font will be used for table headers and any other text that should appear in bold. If not provided, the normal font specified by data and name will be used for all text, including headers.

bold?: object

Defined in projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter-options.ts:192

Remarks

For best visual results, use the bold variant from the same font family as the regular font.

Base64-encoded font data from a TrueType Font (TTF) file.

This should be the complete TTF file contents encoded as a Base64 string. The font must include glyphs for all characters that may appear in your grid data.

data: string

Defined in projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter-options.ts:167

Remarks

To convert a TTF file to Base64 in Node.js:

const base64Data = require('fs').readFileSync('font.ttf').toString('base64');

The font family name to register with the PDF library.

This name is used internally by jsPDF to reference the font. It should be a simple identifier without spaces (e.g., 'NotoSans', 'ArialUnicode').

name: string

Defined in projects/igniteui-angular/grids/core/src/services/pdf/pdf-exporter-options.ts:179

Remarks

The name does not need to match the actual font's internal name, but using a descriptive name helps with debugging and maintenance.