title: How to find the font size in Python from an image?
body: <p>I am currently trying to find out how I can find out the font size from an image, using <code>tesseract ocr</code> or maybe something else within Python.</p>
  <p>My current image here: <a href="https://i.stack.imgur.com/QC6GI.jpg" rel="nofollow noreferrer">Image 1</a>. Within the image, at the top I know for certain it is a font 6 and the bottom is font 7.</p>
  <p>I am starting out a side project of scanning the image and seeing if it has a minimum legal font requirement (which is a font 7).</p>
  <p>How can I determine whether all text within the image is at font 7 and not below 7?</p>
  <p>Here is what I'm thinking to do:</p>
  <pre><code>legal_font = 7
  
  if legal_font &gt; 6:
      print(&quot;Illegal&quot;)
  else:
      print(&quot;Legal&quot;)
  </code></pre>
  <p>the number 6 is the one that will wary, due to loads of text around the image.</p>