lib/pdf.js
function registerFont(folder) {
    var data = fs.readFileSync(folder + "/font.json", {encoding: "utf8"});
    var fontArray = JSON.parse(data);
    for (var i = 0, len = fontArray.length; i < len; i++) {
        var font = fontArray[i];
        font.path = folder;
        mdjson.Font.registerFont(font);
    }
}
function registerFont(folder) {
    var data = fs.readFileSync(folder + "/font.json", {encoding: "utf8"});
    var fontArray = JSON.parse(data);
    for (var i = 0, len = fontArray.length; i < len; i++) {
        var font = fontArray[i];
        font.path = folder;
        mdjson.Font.registerFont(font);
    }
}
function registerFont ( folder ) { var data = fs . readFileSync ( folder + "/font.json" , { encoding : "utf8" } ) ; var fontArray = JSON . parse ( data ) ; for ( var i = 0 , len = fontArray . length ; i < len ; i ++ ) { var font = fontArray [ i ] ; font . path = folder ; mdjson . Font . registerFont ( font ) ; } }
Register a font
@param {string} folder
Register a font