dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingFont.cs, 1.4,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingFont.cs, 1.4, 1.5
Date: Sun, 30 Nov 2003 05:41:33 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv14568/System.Drawing.Xsharp

Modified Files:
        DrawingFont.cs 
Log Message:


The default font is named "Microsoft Sans Serif", not "Arial"; remove the
dpi adjustments on "SizeInPoints" because they weren't supposed to be
there; normalize font sizes to the nearest supported X size to prevent
horrid looking stretched bitmap fonts.


Index: DrawingFont.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingFont.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DrawingFont.cs      2 Nov 2003 22:22:07 -0000       1.4
--- DrawingFont.cs      30 Nov 2003 05:41:31 -0000      1.5
***************
*** 53,59 ****
                                                if(xfont == null)
                                                {
!                                                       xfont = new Xsharp.Font
                                                                
(MapFamilyName(properties.Name),
!                                                                
(int)(properties.SizeInPoints * 10.0f * dpi / 72f),
                                                                 
(Xsharp.FontStyle)(properties.Style));
                                                }
--- 53,59 ----
                                                if(xfont == null)
                                                {
!                                                       xfont = 
Xsharp.Font.CreateFont
                                                                
(MapFamilyName(properties.Name),
!                                                                
(int)(properties.SizeInPoints * 10.0f),
                                                                 
(Xsharp.FontStyle)(properties.Style));
                                                }
***************
*** 90,97 ****
                                        return Xsharp.Font.Serif;
                                }
                                else if(String.Compare(name, "Helvetica", true) 
== 0 ||
                                        String.Compare(name, "Helv", true) == 0 
||
-                                       String.Compare
-                                                       (name, "Microsoft Sans 
Serif", true) == 0 ||
                                        String.Compare(name, "Arial", true) == 
0 ||
                                        String.Compare(name, 0, "Arial ", 0, 6, 
true) == 0)
--- 90,100 ----
                                        return Xsharp.Font.Serif;
                                }
+                               else if(String.Compare
+                                                       (name, "Microsoft Sans 
Serif", true) == 0)
+                               {
+                                       return Xsharp.Font.DefaultSansSerif;
+                               }
                                else if(String.Compare(name, "Helvetica", true) 
== 0 ||
                                        String.Compare(name, "Helv", true) == 0 
||
                                        String.Compare(name, "Arial", true) == 
0 ||
                                        String.Compare(name, 0, "Arial ", 0, 6, 
true) == 0)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]