title: The Graphics.MeasureString method is not accurate on windows mobile
body: <p>The <a href="https://msdn.microsoft.com/en-us/library/6xe5hazb(v=vs.110).aspx" rel="nofollow">Graphics.MeasureString(string, Font)</a> method is not accurate on windows mobile. Is there a solution for the problem?</p>
  
  <pre><code>public static string GetSubString(Graphics graphic, Font font, 
                                                      string text, int availableWidth)
  {
      string tempString = string.Empty;
  
      Size stringSize = graphic.MeasureString(text, font).ToSize();
      if (stringSize.Width &lt; availableWidth)
      {
          return text;
      }
  
      for (int index = text.Length-1; index &gt; 3; index--)
      {
          tempString = string.Format("{0}...", text.Substring(0, index));
  
          Size tempStringSize = graphic.MeasureString(tempString, font).ToSize();
          if (tempStringSize.Width &lt; availableWidth)
          {
              return tempString;
          }
      }
  }
  </code></pre>
  
  <p>The method return incorrect size, not matching the width of the label.</p>