From 6d30d71256098d34b569d289173e85e7d4ba9670 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 18 Jun 2008 02:23:27 +0000 Subject: change the default drawing font from Times -> Arial, as san serif fonts are a bit easier on the eyes on textures. Add a new "FontName" attribute that can be used to override the font type. --- .../Modules/Scripting/VectorRender/VectorRenderModule.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs index bbd4fa3..27f1182 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs @@ -217,7 +217,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender Point startPoint = new Point(0, 0); Point endPoint = new Point(0, 0); Pen drawPen = new Pen(Color.Black, 7); - Font myFont = new Font("Times New Roman", 14); + string fontName = "Arial"; + float fontSize = 14; + Font myFont = new Font(fontName, fontSize); SolidBrush myBrush = new SolidBrush(Color.Black); char[] lineDelimiter = {';'}; char[] partsDelimiter = {','}; @@ -301,12 +303,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender { nextLine = nextLine.Remove(0, 8); nextLine = nextLine.Trim(); - float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); - myFont = new Font("Times New Roman", size); + fontSize = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); + myFont = new Font(fontName, fontSize); } - else if (nextLine.StartsWith("PenSize")) + else if (nextLine.StartsWith("FontName")) { nextLine = nextLine.Remove(0, 8); + fontName = nextLine.Trim(); + myFont = new Font(fontName, fontSize); + } + else if (nextLine.StartsWith("PenSize")) + { + nextLine = nextLine.Remove(0, 7); nextLine = nextLine.Trim(); float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); drawPen.Width = size; -- cgit v1.1