We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 528d4cc commit 6007ef9Copy full SHA for 6007ef9
lib/FontMetrics.js
@@ -20,7 +20,7 @@ var FontMetrics = function(family, size) {
20
21
// Now we can measure width and height of the letter
22
line.innerHTML = 'm'; // It doesn't matter what text goes here
23
- this._width = line.offsetHeight;
+ this._width = line.offsetWidth;
24
this._height = line.offsetHeight;
25
26
// Now creating 1px sized item that will be aligned to baseline
@@ -35,7 +35,7 @@ var FontMetrics = function(family, size) {
35
// Baseline is important for positioning text on canvas
36
this._baseline = span.offsetTop + span.offsetHeight;
37
38
- document.body.removeChild(line);
+ // document.body.removeChild(line);
39
};
40
41
module.exports = FontMetrics;
0 commit comments