change GetDrawStringSize so result better matchs rendering size

This commit is contained in:
UbitUmarov
2019-01-30 00:46:40 +00:00
parent eb7715e2f8
commit d86bb08c28

View File

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