diff options
author | Sean Dague | 2008-06-18 02:23:27 +0000 |
---|---|---|
committer | Sean Dague | 2008-06-18 02:23:27 +0000 |
commit | 6d30d71256098d34b569d289173e85e7d4ba9670 (patch) | |
tree | 59f8e6d01ba6dcabc6d23d0590f9a18f981b715d /OpenSim | |
parent | tweak dynamic texture stuff after the meeting today. This should (diff) | |
download | opensim-SC-6d30d71256098d34b569d289173e85e7d4ba9670.zip opensim-SC-6d30d71256098d34b569d289173e85e7d4ba9670.tar.gz opensim-SC-6d30d71256098d34b569d289173e85e7d4ba9670.tar.bz2 opensim-SC-6d30d71256098d34b569d289173e85e7d4ba9670.tar.xz |
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.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs | 16 |
1 files changed, 12 insertions, 4 deletions
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 | |||
217 | Point startPoint = new Point(0, 0); | 217 | Point startPoint = new Point(0, 0); |
218 | Point endPoint = new Point(0, 0); | 218 | Point endPoint = new Point(0, 0); |
219 | Pen drawPen = new Pen(Color.Black, 7); | 219 | Pen drawPen = new Pen(Color.Black, 7); |
220 | Font myFont = new Font("Times New Roman", 14); | 220 | string fontName = "Arial"; |
221 | float fontSize = 14; | ||
222 | Font myFont = new Font(fontName, fontSize); | ||
221 | SolidBrush myBrush = new SolidBrush(Color.Black); | 223 | SolidBrush myBrush = new SolidBrush(Color.Black); |
222 | char[] lineDelimiter = {';'}; | 224 | char[] lineDelimiter = {';'}; |
223 | char[] partsDelimiter = {','}; | 225 | char[] partsDelimiter = {','}; |
@@ -301,12 +303,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender | |||
301 | { | 303 | { |
302 | nextLine = nextLine.Remove(0, 8); | 304 | nextLine = nextLine.Remove(0, 8); |
303 | nextLine = nextLine.Trim(); | 305 | nextLine = nextLine.Trim(); |
304 | float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); | 306 | fontSize = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); |
305 | myFont = new Font("Times New Roman", size); | 307 | myFont = new Font(fontName, fontSize); |
306 | } | 308 | } |
307 | else if (nextLine.StartsWith("PenSize")) | 309 | else if (nextLine.StartsWith("FontName")) |
308 | { | 310 | { |
309 | nextLine = nextLine.Remove(0, 8); | 311 | nextLine = nextLine.Remove(0, 8); |
312 | fontName = nextLine.Trim(); | ||
313 | myFont = new Font(fontName, fontSize); | ||
314 | } | ||
315 | else if (nextLine.StartsWith("PenSize")) | ||
316 | { | ||
317 | nextLine = nextLine.Remove(0, 7); | ||
310 | nextLine = nextLine.Trim(); | 318 | nextLine = nextLine.Trim(); |
311 | float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); | 319 | float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); |
312 | drawPen.Width = size; | 320 | drawPen.Width = size; |