Merge pull request #461 from knocte/xbuild_improvements
[mono.git] / mcs / class / System.Drawing / System.Drawing / SystemFonts.cs
1 //
2 // Copyright (C) 2005, 2007 Novell, Inc (http://www.novell.com)
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23 // Authors:
24 //      Jordi Mas i Hernandez <jordimash@gmail.com>
25 //      Sebastien Pouliot  <sebastien@ximian.com>
26 //
27
28 #if NET_2_0
29
30 namespace System.Drawing {
31
32         public sealed class SystemFonts {
33                 
34                 static SystemFonts ()
35                 {
36                 }
37
38                 private SystemFonts()
39                 {
40                 }
41
42                 public static Font GetFontByName (string systemFontName)
43                 {
44                         if (systemFontName == "CaptionFont")
45                                 return CaptionFont;
46
47                         if (systemFontName == "DefaultFont")
48                                 return DefaultFont;
49
50                         if (systemFontName == "DialogFont")
51                                 return DialogFont;      
52
53                         if (systemFontName == "IconTitleFont")
54                                 return IconTitleFont;
55
56                         if (systemFontName == "MenuFont")
57                                 return MenuFont;
58
59                         if (systemFontName == "MessageBoxFont")
60                                 return MessageBoxFont;
61
62                         if (systemFontName == "SmallCaptionFont")
63                                 return SmallCaptionFont;
64
65                         if (systemFontName == "StatusFont")
66                                 return StatusFont;                      
67                         
68                         return null;
69                 }
70
71                 public static Font CaptionFont { 
72                         get { return new Font ("Microsoft Sans Serif", 11, "CaptionFont"); }
73                 }
74
75                 public static Font DefaultFont  { 
76                         get { return new Font ("Microsoft Sans Serif", 8.25f, "DefaultFont"); }
77                 }
78
79                 public static Font DialogFont  { 
80                         get { return new Font ("Tahoma", 8, "DialogFont"); }
81                 }
82
83                 public static Font IconTitleFont  { 
84                         get { return new Font ("Microsoft Sans Serif", 11, "IconTitleFont"); }
85                 }
86
87                 public static Font MenuFont  { 
88                         get { return new Font ("Microsoft Sans Serif", 11, "MenuFont"); }
89                 }
90
91                 public static Font MessageBoxFont  { 
92                         get { return new Font ("Microsoft Sans Serif", 11, "MessageBoxFont"); }
93                 }
94
95                 public static Font SmallCaptionFont  { 
96                         get { return new Font ("Microsoft Sans Serif", 11, "SmallCaptionFont"); }
97                 }
98
99                 public static Font StatusFont  { 
100                         get { return new Font ("Microsoft Sans Serif", 11, "StatusFont"); }
101                 }             
102         }
103 }
104
105 #endif