title: How to convert text width in pixels to percent of screen width/height?
body: <p>I am measuring a string text to see if I should add a <code>\n</code> for wrapping.</p>
  
  <p>I am using the <code>Paint.measureText</code> function, and it works most of the time but it occurs to me that this isn't accurate since a px doesn't equal a dp - I've seen online how to convert pixels to dp, but instead what I would rather do is convert px to a percentage of the screen size for example</p>
  
  <p>If <code>a</code> is 8 pixels wide, how would I say:</p>
  
  <pre><code>float LetterWidthPercent = _______ //get width of character in percent of screen width
  float LetterHeightPercent = _______ //get height of character in percent of screen height
  </code></pre>
  
  <p>This way I could just see:</p>
  
  <pre><code> if (LineOfTextWidth &gt;= ScreenWidth * 0.9f) //90%
  </code></pre>
  
  <p>This would be an extremely useful function to have handy.</p>