0
Firefox, Chrome and Safari all have a zoom function (C-+ and C--) which is really nice. But is there a way to find out what is the generated font-size after the zoom?
0
Firefox, Chrome and Safari all have a zoom function (C-+ and C--) which is really nice. But is there a way to find out what is the generated font-size after the zoom?
1
In Firefox, I would just install the NoSquint extension, which (in addition to its other features) can display the current zoom level in the status bar.
0
Here is a little dirty trick as copied from: http://www.webdeveloper.com/forum/showthread.php?t=170413
document.emSize=function(pa){
pa= pa || document.body;
var who= document.createElement('div');
var atts= {fontSize:'1em',padding:'0',position:'absolute',lineHeight:'1',visibility:'hidden'};
for(var p in atts){
who.style[p]= atts[p];
}
who.appendChild(document.createTextNode('M'));
pa.appendChild(who);
var fs= [who.offsetWidth,who.offsetHeight];
pa.removeChild(who);
return fs;
}