title: Centering text(String) in a surface view
body: <p>How do you horizontally center a String in a surface view?</p>
  
  <p>I don't want</p>
  
  <pre><code>c.drawText(""+score, c.getWidth()/2, y);
  </code></pre>
  
  <p>Because this will display text starting at the center of the screen.</p>
  
  <p>I want something like</p>
  
  <pre><code>c.drawText(""+score, c.getWidth()/2-score.length()/2*fontSize, y);
  </code></pre>
  
  <p>Is there an equation to solve this problem?  If not, are there any other ways to center text in a surface view? </p>
  
  <p><em>BTW I'm using a custom font, I don't know if that changes anything or not.  If you need to know any extra information about the font please comment.</em></p>