Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font family has incorrect syntax #688

Closed
dnschnur opened this issue Sep 28, 2012 · 1 comment
Closed

Font family has incorrect syntax #688

dnschnur opened this issue Sep 28, 2012 · 1 comment
Assignees
Milestone

Comments

@dnschnur
Copy link
Member

Original author: cthe...@gmail.com (September 27, 2011 23:37:31)

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: http://code.google.com/p/flot/issues/detail?id=609

@dnschnur
Copy link
Member Author

dnschnur commented Mar 3, 2013

This was resolved as part of the canvas-text work in pull request #935.

@dnschnur dnschnur closed this as completed Mar 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant