charset support
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 20 Dec 2005 16:59:08 +0000 (16:59 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 20 Dec 2005 16:59:08 +0000 (16:59 -0000)
svn path=/branches/mainsoft/gh1.7/mcs/; revision=54657

mcs/class/System.Drawing/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing/Font.jvm.cs

index 40061d51c5ed9418223658917465844df935b594..a18745e15e32f98331bbc9a873664da1e379ab4e 100644 (file)
@@ -1,3 +1,7 @@
+2005-12-20  Konstantin Triger <kostat@mainsoft.com>
+
+        * Font.jvm.cs: charset support.
+
 2005-12-14  Konstantin Triger <kostat@mainsoft.com>
 
         * StrokeFactory.jvm.cs: create AdvancedStroke when have penTransform.
index 7eac44a0c694358357d978e7e60af46b77f9b3d5..6f196d93a264ee2b4037c3422fc880ac3bd5f672 100644 (file)
@@ -11,9 +11,12 @@ namespace System.Drawing {
 
                #region variables
 
+               const byte DEFAULT_CHARSET = 1;
+
                private readonly GraphicsUnit _gUnit = GraphicsUnit.Point;
                private readonly FontFamily _fontFamily;
                private readonly awt.Font _jFont;
+               private readonly byte _charset;
 
                #endregion
 
@@ -51,32 +54,31 @@ namespace System.Drawing {
                }
 
                public Font(FontFamily family, float emSize)
-                       : this(family, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) {
+                       : this(family, emSize, FontStyle.Regular, GraphicsUnit.Point, DEFAULT_CHARSET, false) {
                }
 
                public Font(FontFamily family, float emSize, FontStyle style)
-                       : this(family, emSize, style, GraphicsUnit.Point, (byte)0, false) {
+                       : this(family, emSize, style, GraphicsUnit.Point, DEFAULT_CHARSET, false) {
                }
                public Font(FontFamily family, float emSize, GraphicsUnit unit)
-                       : this(family, emSize, FontStyle.Regular, unit, (byte)0, false) {
+                       : this(family, emSize, FontStyle.Regular, unit, DEFAULT_CHARSET, false) {
                }
 
                public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit)
-                       : this(family, emSize, style, unit, (byte)0, false) {
+                       : this(family, emSize, style, unit, DEFAULT_CHARSET, false) {
                }
 
                public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet)
                        : this(family, emSize, style, unit, charSet, false) {
                }
                
-               [MonoTODO]
                public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical) {
                        if (family == null)
                                throw new ArgumentNullException("family");
 
-                       //TODO: charset management
                        _gUnit = unit;
                        _fontFamily = family;
+                       _charset = charSet;
 
                        java.util.Hashtable attribs = new java.util.Hashtable();
                        attribs.put(TextAttribute.FAMILY, family.Name/*TODO: family doungrade possibility*/);
@@ -156,7 +158,7 @@ namespace System.Drawing {
                
                public byte GdiCharSet {
                        get {
-                               return 1; //DEFAULT_CHARSET
+                               return _charset;
                        }
                }