DefineFont
methodsDefines a map with locations for TrueType Font (.ttf) files. It is safe to call this method multiple times.
The exportPDF method will use the font files when embedding them in a PDF document.
Since Kendo UI 2014 Q3 SP1, the Kendo UI PDF generator is able to dig CSS @font-face declarations directly from the stylesheets. "Manually" calling the pdf.defineFont()method is no longer necessary. For more information how to embed fonts using CSS at-rules - check this section. This will work only if the style sheet and fonts are loaded from the same domain.
Fonts must be loaded from the same origin or CORS-enabled. The only format supported by the
defineFontmethod is.ttf.
Parameters:mapObject
A map for font names, variants and the location of its .ttf file.
- The key is the font name. Optional variants are separated with a pipe symbol.
- The value is the TrueType Font (.ttf) file URL.