From 234bcf189bdf919e5a2da796ea580f3c18f8f63b Mon Sep 17 00:00:00 2001 From: Manuel Luis SanmartĂ­n Rozada Date: Mon, 28 Jul 2014 00:58:51 +0200 Subject: jsrrdgraph: Add fallback fonts. --- js/RrdGfxCanvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/RrdGfxCanvas.js') diff --git a/js/RrdGfxCanvas.js b/js/RrdGfxCanvas.js index 0d1784e..324b655 100644 --- a/js/RrdGfxCanvas.js +++ b/js/RrdGfxCanvas.js @@ -211,7 +211,7 @@ RrdGfxCanvas.prototype.text = function (x, y, color, font, tabwidth, angle, h_al y = Math.round(y); this.ctx.save(); - this.ctx.font = font.size+'px '+"'"+font.font+"'"; + this.ctx.font = font.size+'px '+font.font; switch (h_align) { case RrdGraph.GFX_H_LEFT: @@ -247,7 +247,7 @@ RrdGfxCanvas.prototype.text = function (x, y, color, font, tabwidth, angle, h_al RrdGfxCanvas.prototype.get_text_width = function(start, font, tabwidth, text) { this.ctx.save(); - this.ctx.font = font.size+"px "+font.font; + this.ctx.font = font.size+'px '+font.font; var width = this.ctx.measureText(text); this.ctx.restore(); return width.width; -- cgit v1.1