if (!file) {
// The file data is not specified. Trying to fix the font name
// to be used with the canvas.font.
- var fontName = name.replace(/,_/g, '-');
+ var fontName = name.replace(/[,_]/g, '-');
fontName = stdFontMap[fontName] || fontName;
this.bold = (fontName.search(/bold/gi) != -1);
return null;
// Using base font name as a font name.
- baseFontName = baseFontName.name.replace(/,_/g, '-');
+ baseFontName = baseFontName.name.replace(/[,_]/g, '-');
var metricsAndMap = this.getBaseFontMetricsAndMap(baseFontName);
var properties = {