[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp mssB08.pcf, NONE, 1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp mssB08.pcf, NONE, 1.1 mssBI08.pcf, NONE, 1.1 mssI08.pcf, NONE, 1.1 mssR08.pcf, NONE, 1.1 DrawingToolkit.cs, 1.22, 1.23 System.Drawing.Xsharp.build, 1.5, 1.6 |
Date: |
Mon, 01 Dec 2003 02:03:48 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv25649/System.Drawing.Xsharp
Modified Files:
DrawingToolkit.cs System.Drawing.Xsharp.build
Added Files:
mssB08.pcf mssBI08.pcf mssI08.pcf mssR08.pcf
Log Message:
Implement a font registration system, and register some PCF fonts through
it (not fully implemented yet).
Index: DrawingToolkit.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingToolkit.cs,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** DrawingToolkit.cs 1 Dec 2003 00:23:28 -0000 1.22
--- DrawingToolkit.cs 1 Dec 2003 02:03:45 -0000 1.23
***************
*** 29,32 ****
--- 29,33 ----
using System.Drawing.Imaging;
using System.Threading;
+ using System.Reflection;
using Xsharp;
using DotGNU.Images;
***************
*** 48,51 ****
--- 49,55 ----
app = new Xsharp.Application(null, null);
+ // Register the additional fonts that we
required.
+ RegisterFonts();
+
// Get the placeholder widget for the screen.
placeholder =
app.Display.DefaultScreenOfDisplay.Placeholder;
***************
*** 119,122 ****
--- 123,154 ----
LoadResources();
// TODO: raise a repaint on all windows
+ }
+
+ // Register extra fonts that we need to imitate Winforms exactly.
+ private void RegisterFonts()
+ {
+ Assembly assembly =
Assembly.GetExecutingAssembly();
+ String family = Xsharp.Font.DefaultSansSerif;
+ try
+ {
+ Xsharp.Font.RegisterFont
+ (family, 82,
Xsharp.FontStyle.Normal,
+ assembly, "mssR08.pcf");
+ Xsharp.Font.RegisterFont
+ (family, 82,
Xsharp.FontStyle.Bold,
+ assembly, "mssB08.pcf");
+ Xsharp.Font.RegisterFont
+ (family, 82,
Xsharp.FontStyle.Italic,
+ assembly, "mssI08.pcf");
+ Xsharp.Font.RegisterFont
+ (family, 82,
+ Xsharp.FontStyle.Bold |
Xsharp.FontStyle.Italic,
+ assembly, "mssBI08.pcf");
+ }
+ catch(Exception)
+ {
+ // Ignore errors if we couldn't
register a font,
+ // because we can fall back to normal X
fonts.
+ }
}
--- NEW FILE: mssR08.pcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: mssI08.pcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: mssBI08.pcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: mssB08.pcf ---
(This appears to be a binary file; contents omitted.)
Index: System.Drawing.Xsharp.build
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/System.Drawing.Xsharp.build,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** System.Drawing.Xsharp.build 26 Nov 2003 06:43:36 -0000 1.5
--- System.Drawing.Xsharp.build 1 Dec 2003 02:03:46 -0000 1.6
***************
*** 17,20 ****
--- 17,24 ----
</sources>
+ <resources basedir="${csant.src.dir}">
+ <includes name="*.pcf"/>
+ </resources>
+
<references>
<file
name="../System.Drawing/System.Drawing.dll"/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp mssB08.pcf, NONE, 1.1 mssBI08.pcf, NONE, 1.1 mssI08.pcf, NONE, 1.1 mssR08.pcf, NONE, 1.1 DrawingToolkit.cs, 1.22, 1.23 System.Drawing.Xsharp.build, 1.5, 1.6,
Rhys Weatherley <address@hidden> <=