Skip to content

Commit 42a7ba5

Browse files
committed
remove obsoleted FontFace from lib/canvas.js
1 parent e219ae7 commit 42a7ba5

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lib/canvas.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var canvas = require('./bindings')
1818
, Context2d = require('./context2d')
1919
, PNGStream = require('./pngstream')
2020
, JPEGStream = require('./jpegstream')
21-
, FontFace = canvas.FontFace
2221
, fs = require('fs')
2322
, packageJson = require("../package.json")
2423
, FORMATS = ['image/png', 'image/jpeg'];
@@ -81,29 +80,6 @@ exports.JPEGStream = JPEGStream;
8180
exports.Image = Image;
8281
exports.ImageData = canvas.ImageData;
8382

84-
if (FontFace) {
85-
var Font = function Font(name, path, idx) {
86-
this.name = name;
87-
this._faces = {};
88-
89-
this.addFace(path, 'normal', 'normal', idx);
90-
};
91-
92-
Font.prototype.addFace = function(path, weight, style, idx) {
93-
style = style || 'normal';
94-
weight = weight || 'normal';
95-
96-
var face = new FontFace(path, idx || 0);
97-
this._faces[weight + '-' + style] = face;
98-
};
99-
100-
Font.prototype.getFace = function(weightStyle) {
101-
return this._faces[weightStyle] || this._faces['normal-normal'];
102-
};
103-
104-
exports.Font = Font;
105-
}
106-
10783
/**
10884
* Context2d implementation.
10985
*/

0 commit comments

Comments
 (0)