wildanSawaludin / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Font family has incorrect syntax #609

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Canvas' font property is build in two places:

drawAxisLabels

// Important: Don't use quotes around axis.font.family! Just around single 
// font names like 'Times New Roman' that have a space or special character in 
it.
ctx.font = f.style + " " + f.variant + " " + f.weight + " " + f.size + "px " + 
f.family;

measureTickLabels
ctx.font = f.style + " " + f.variant + " " + f.weight + " " + f.size + "px '" + 
f.family + "'";

It seems the version in measureTickLabels isn't paying attention to the warning 
in the other location.  It is producing (in my case) an invalid font-family: 
normal normal normal 13px 'Verdana, arial, sans-serif', which means all the 
labels aren't in the right spot.

Original issue reported on code.google.com by cthe...@gmail.com on 27 Sep 2011 at 11:37

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 8:39