(function(jsPDFAPI) {
    var font =
        '[encoded data, 227680 characters]';
    var callAddFont = function() {
        this.addFileToVFS('Roboto-Bold-normal.ttf', font);
        this.addFont('Roboto-Bold-normal.ttf', 'Roboto-Bold', 'normal');
    };
    jsPDFAPI.events.push(['addFonts', callAddFont]);
})(jsPDF.API);
