Update font_metrics.js

Fix for "Unspecified error" in IE when measuring elements that are not visible