Fix TextBox display to handle kerning fonts
commit3280b20650e8e122bd8c985bbc22c6e18851c240
authorStephen McConnel <stephen_mcconnel@sil.org>
Tue, 27 Jan 2015 21:40:11 +0000 (27 15:40 -0600)
committerStephen McConnel <stephen_mcconnel@sil.org>
Tue, 27 Jan 2015 21:40:11 +0000 (27 15:40 -0600)
tree883b22cbf80c16f226b343a1b5599857c9735bc9
parent81af7de23dd169ce4945c85835603292c0fa4a8a
Fix TextBox display to handle kerning fonts

Many fonts, including the default DejaVu Sans, use kerning between
certain character pairs.  This resulted in garbled or even invisible
display during typing of strings with a lot of kerning going on.  An
attempt is made to retain the current speed-optimized implementation
while using accurate, slower string width measurements when needed.
See https://bugzilla.xamarin.com/show_bug.cgi?id=26478 for details.
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Line.cs