preferences -> a...">

Define advanced safari settings: "never use font size smaller ..." from javascript?

Safari (mac) has an option under Safari -> preferences -> advanced that disabled the use of fonts smaller than the specified point size.

I am writing a PDF application using PDF.js, which causes the fonts to be huge and overlap when this option is enabled.

I am trying to figure out if there is a way from javascript to determine if this setting is enabled or not before downloading the PDF and then instead download a message explaining to the user what they need to do to view the PDF correctly.

Any idea?

+3


source to share


1 answer


Make a DOM node with font-size: 1px, line-height: 1.0

and measure its height. If it is > 1px

, then the font size is limited.



http://codepen.io/nevir/full/trwEb

+1


source







All Articles