change GetDrawStringSize so result better matchs rendering size

0.9.1.0-post-fixes
UbitUmarov 2019-01-30 00:46:40 +00:00
parent eb7715e2f8
commit d86bb08c28
1 changed files with 1 additions and 2 deletions

View File

@ -125,11 +125,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
using (Font myFont = new Font(fontName, fontSize)) using (Font myFont = new Font(fontName, fontSize))
{ {
SizeF stringSize = new SizeF(); SizeF stringSize = new SizeF();
// XXX: This lock may be unnecessary. // XXX: This lock may be unnecessary.
lock (m_graph) lock (m_graph)
{ {
stringSize = m_graph.MeasureString(text, myFont); stringSize = m_graph.MeasureString(text, myFont, text.Length, StringFormat.GenericTypographic);
xSize = stringSize.Width; xSize = stringSize.Width;
ySize = stringSize.Height; ySize = stringSize.Height;
} }