Defines 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.


map Object

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.

Example - Define font locations for embedding

    // Import DejaVu Sans font for embedding. WebComponentsIcons is the font used for the Kendo font icons only
        "DejaVu Sans"             : "",
        "DejaVu Sans|Bold"        : "",
        "DejaVu Sans|Bold|Italic" : "",
        "DejaVu Sans|Italic"      : "",
        "WebComponentsIcons"      : ""

    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var text = new draw.Text(
        "Lorem ípsum dolor sit amét, pro éu facilis vulputáte témporibus.",
        [20, 20], {
            font: "14px 'DejaVu Sans', Arial, sans-serif"

    var root = new draw.Group();

    draw.exportPDF(root, { paperSize: "A5", landscape: true }).done(function(data) {
            dataURI: data,
            fileName: "dejavu.pdf"
In this article