aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js/RrdGfxCanvas.js
diff options
context:
space:
mode:
authorManuel Luis SanmartĂ­n Rozada2014-07-28 00:58:51 +0200
committerPim van den Berg2014-08-02 12:29:52 +0200
commit234bcf189bdf919e5a2da796ea580f3c18f8f63b (patch)
tree4570513a034e629b5821e68d7aea5b2235dcc1da /js/RrdGfxCanvas.js
parentjsrrdgraph: Use Typed Arrays for better performance (diff)
downloadapt-panopticon_cgp-234bcf189bdf919e5a2da796ea580f3c18f8f63b.zip
apt-panopticon_cgp-234bcf189bdf919e5a2da796ea580f3c18f8f63b.tar.gz
apt-panopticon_cgp-234bcf189bdf919e5a2da796ea580f3c18f8f63b.tar.bz2
apt-panopticon_cgp-234bcf189bdf919e5a2da796ea580f3c18f8f63b.tar.xz
jsrrdgraph: Add fallback fonts.
Diffstat (limited to 'js/RrdGfxCanvas.js')
-rw-r--r--js/RrdGfxCanvas.js4
1 files changed, 2 insertions, 2 deletions
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
211 y = Math.round(y); 211 y = Math.round(y);
212 212
213 this.ctx.save(); 213 this.ctx.save();
214 this.ctx.font = font.size+'px '+"'"+font.font+"'"; 214 this.ctx.font = font.size+'px '+font.font;
215 215
216 switch (h_align) { 216 switch (h_align) {
217 case RrdGraph.GFX_H_LEFT: 217 case RrdGraph.GFX_H_LEFT:
@@ -247,7 +247,7 @@ RrdGfxCanvas.prototype.text = function (x, y, color, font, tabwidth, angle, h_al
247RrdGfxCanvas.prototype.get_text_width = function(start, font, tabwidth, text) 247RrdGfxCanvas.prototype.get_text_width = function(start, font, tabwidth, text)
248{ 248{
249 this.ctx.save(); 249 this.ctx.save();
250 this.ctx.font = font.size+"px "+font.font; 250 this.ctx.font = font.size+'px '+font.font;
251 var width = this.ctx.measureText(text); 251 var width = this.ctx.measureText(text);
252 this.ctx.restore(); 252 this.ctx.restore();
253 return width.width; 253 return width.width;