Safari (mac) has a setting under safari -> preferences -> advanced that disabled the use of fonts smaller than a given point size.
I’m writing a PDF application using PDF.js which causes the fonts to be rendered huge and overlap when this setting is enabled.
I’m trying to find out if there is a way from javascript to detect if this setting is enabled or not before loading the PDF, and then instead load a message explaining to the user what they need to do to properly view the PDF.
Any idea?
Make a DOM node with a
font-size: 1px, line-height: 1.0and measure its height. If it’s> 1px, then your font size is capped.http://codepen.io/nevir/full/trwEb