changeset 2369:ee157d437aa8

6954424: Support OpenType/CFF fonts in JDK 7 Reviewed-by: bae, igor
author prr
date Thu, 27 May 2010 08:53:45 -0700
parents 1ad7fbef48d0
children 5294c7067018
files src/share/classes/java/awt/Font.java src/share/classes/sun/font/SunFontManager.java
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Font.java	Thu May 20 16:00:25 2010 -0700
+++ b/src/share/classes/java/awt/Font.java	Thu May 27 08:53:45 2010 -0700
@@ -343,6 +343,10 @@
      * Identify a font resource of type TRUETYPE.
      * Used to specify a TrueType font resource to the
      * {@link #createFont} method.
+     * The TrueType format was extended to become the OpenType
+     * format, which adds support for fonts with Postscript outlines,
+     * this tag therefore references these fonts, as well as those
+     * with TrueType outlines.
      * @since 1.3
      */
 
--- a/src/share/classes/sun/font/SunFontManager.java	Thu May 20 16:00:25 2010 -0700
+++ b/src/share/classes/sun/font/SunFontManager.java	Thu May 27 08:53:45 2010 -0700
@@ -73,7 +73,9 @@
                 return(name.startsWith(".ttf", offset) ||
                        name.startsWith(".TTF", offset) ||
                        name.startsWith(".ttc", offset) ||
-                       name.startsWith(".TTC", offset));
+                       name.startsWith(".TTC", offset) ||
+                       name.startsWith(".otf", offset) ||
+                       name.startsWith(".OTF", offset));
             }
         }
     }
@@ -108,7 +110,9 @@
                     name.startsWith(".ttf", offset) ||
                     name.startsWith(".TTF", offset) ||
                     name.startsWith(".ttc", offset) ||
-                    name.startsWith(".TTC", offset);
+                    name.startsWith(".TTC", offset) ||
+                    name.startsWith(".otf", offset) ||
+                    name.startsWith(".OTF", offset);
                 if (isTT) {
                     return true;
                 } else if (noType1Font) {