Is there a way to only change the font size of a canvas context without having to know/write the font family.
var ctx = document.getElementById(\"canvas\").
try this (using jquery):
var span = $('').css('font', context.font).css('visibility', 'hidden'); $('body').append(span); span[0].style.fontWeight = 'bold'; span[0].style.fontSize = '12px'; //add more style here. var font = span[0].style.font; span.remove(); return font;