Turn audio into a shareable video. forked from nypublicradio/audiogram

register-fonts.js 288B

1234567891011
  1. var fonts = require("../settings/").fonts,
  2. _ = require("underscore"),
  3. Canvas = require("canvas");
  4. // Register custom fonts one time
  5. if (Array.isArray(fonts)) {
  6. fonts.forEach(function(font){
  7. Canvas.registerFont(font.file, _.pick(font, "family", "weight", "style"));
  8. });
  9. }