Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmallsql <smallsql>2011-07-15 20:17:55 +0400
committersmallsql <smallsql>2011-07-15 20:17:55 +0400
commit08de1a55da61f655b3c0d963ced67a17a2e7e959 (patch)
treefd89fae1cf5811c9f210299c0b55b248c2d70d7b /openjdk/sun
parenta0c475342a25a32bf8cd104b233584c624c8d37a (diff)
Move createFont2D from FontManager to SunFontManager
Diffstat (limited to 'openjdk/sun')
-rw-r--r--openjdk/sun/font/SunFontManager.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/openjdk/sun/font/SunFontManager.java b/openjdk/sun/font/SunFontManager.java
index a7ed2a28..53de4614 100644
--- a/openjdk/sun/font/SunFontManager.java
+++ b/openjdk/sun/font/SunFontManager.java
@@ -1,3 +1,26 @@
+/*
+ Copyright (C) 2011 Volker Berlin (i-net software)
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen@frijters.net
+
+ */
package sun.font;
import java.io.File;
@@ -5,6 +28,8 @@ import java.io.FilenameFilter;
import javax.swing.plaf.FontUIResource;
+import cli.System.Drawing.FontFamily;
+
public class SunFontManager {
private static class TTFilter implements FilenameFilter {
@@ -133,4 +158,17 @@ public class SunFontManager {
{
return new FontUIResource(family, style, size);
}
+
+ /**
+ * Create a new Font2D without caching. This is used from createFont
+ *
+ * @param family
+ * .NET FontFamily
+ * @param style
+ * the style
+ * @return a Font2D
+ */
+ public static Font2D createFont2D( FontFamily family, int style ) {
+ return new PhysicalFont( family, style );
+ }
}