Mercurial > hg > icedtea6-hg
changeset 2240:2113816251fb
2010-08-12 Andrew John Hughes <ahughes@redhat.com>
* patches/openjdk/4356282-opentype.patch,
* patches/openjdk/6795060-icu_crash.patch,
* patches/openjdk/6954424-opentype_javadoc.patch:
Dropped, applied upstream.
* Makefile.am:
Remove above patches.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Thu, 12 Aug 2010 21:13:14 +0100 |
parents | cbec424f470f |
children | 4ccee81e878c |
files | ChangeLog Makefile.am patches/openjdk/4356282-opentype.patch patches/openjdk/6795060-icu_crash.patch patches/openjdk/6954424-opentype_javadoc.patch |
diffstat | 5 files changed, 10 insertions(+), 349 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Aug 12 19:07:43 2010 +0100 +++ b/ChangeLog Thu Aug 12 21:13:14 2010 +0100 @@ -1,3 +1,12 @@ +2010-08-12 Andrew John Hughes <ahughes@redhat.com> + + * patches/openjdk/4356282-opentype.patch, + * patches/openjdk/6795060-icu_crash.patch, + * patches/openjdk/6954424-opentype_javadoc.patch: + Dropped, applied upstream. + * Makefile.am: + Remove above patches. + 2010-08-12 Andrew John Hughes <ahughes@redhat.com> * patches/openjdk/6678385-window_movement_crasher.patch:
--- a/Makefile.am Thu Aug 12 19:07:43 2010 +0100 +++ b/Makefile.am Thu Aug 12 21:13:14 2010 +0100 @@ -283,10 +283,7 @@ patches/openjdk/6967533-pre_epoch.patch \ patches/fonts-rhel.patch \ patches/fonts-gentoo.patch \ - patches/ipv4-mapped-ipv6-addresses.patch \ - patches/openjdk/6795060-icu_crash.patch \ - patches/openjdk/4356282-opentype.patch \ - patches/openjdk/6954424-opentype_javadoc.patch + patches/ipv4-mapped-ipv6-addresses.patch if WITH_RHINO ICEDTEA_PATCHES += \
--- a/patches/openjdk/4356282-opentype.patch Thu Aug 12 19:07:43 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,227 +0,0 @@ - -# HG changeset patch -# User igor -# Date 1217861443 -14400 -# Node ID b577c70564b8053092bf35f012fa29efe22f56c9 -# Parent 2b1a7d4b9ac69c2366f38b5b0e9ebcf61f1e3277 -4356282: RFE: T2K should be used to rasterize CID/CFF fonts -Reviewed-by: bae, prr - ---- openjdk.orig/jdk/src/share/classes/sun/font/FontManager.java Fri Jun 25 11:53:15 2010 -0700 -+++ openjdk/jdk/src/share/classes/sun/font/FontManager.java Mon Aug 04 18:50:43 2008 +0400 -@@ -3269,7 +3269,7 @@ public final class FontManager { - int fontFormat = FONTFORMAT_NONE; - int fontRank = Font2D.UNKNOWN_RANK; - -- if (ext.equals(".ttf") || isTTC) { -+ if (ext.equals(".ttf") || ext.equals(".otf") || isTTC) { - fontFormat = FONTFORMAT_TRUETYPE; - fontRank = Font2D.TTF_RANK; - } else if (ext.equals(".pfa") || ext.equals(".pfb")) { ---- openjdk.orig/jdk/src/share/classes/sun/font/TrueTypeFont.java Fri Jun 25 11:53:15 2010 -0700 -+++ openjdk/jdk/src/share/classes/sun/font/TrueTypeFont.java Mon Aug 04 18:50:43 2008 +0400 -@@ -90,6 +90,7 @@ public class TrueTypeFont extends FileFo - public static final int ttcfTag = 0x74746366; // 'ttcf' - TTC file - public static final int v1ttTag = 0x00010000; // 'v1tt' - Version 1 TT font - public static final int trueTag = 0x74727565; // 'true' - Version 2 TT font -+ public static final int ottoTag = 0x4f54544f; // 'otto' - OpenType font - - /* -- ID's used in the 'name' table */ - public static final int MS_PLATFORM_ID = 3; -@@ -499,6 +500,7 @@ public class TrueTypeFont extends FileFo - - case v1ttTag: - case trueTag: -+ case ottoTag: - break; - - default: ---- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Fri Jun 25 11:53:15 2010 -0700 -+++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Mon Aug 04 18:50:43 2008 +0400 -@@ -792,7 +792,9 @@ public abstract class SunGraphicsEnviron - 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)); - } - } - } -@@ -815,31 +817,11 @@ public abstract class SunGraphicsEnviron - } - } - -- public static class TTorT1Filter implements FilenameFilter { -- public boolean accept(File dir, String name) { -- -- /* all conveniently have the same suffix length */ -- int offset = name.length()-4; -- if (offset <= 0) { /* must be at least A.ttf or A.pfa */ -- return false; -- } else { -- boolean isTT = -- name.startsWith(".ttf", offset) || -- name.startsWith(".TTF", offset) || -- name.startsWith(".ttc", offset) || -- name.startsWith(".TTC", offset); -- if (isTT) { -- return true; -- } else if (noType1Font) { -- return false; -- } else { -- return(name.startsWith(".pfa", offset) || -- name.startsWith(".pfb", offset) || -- name.startsWith(".PFA", offset) || -- name.startsWith(".PFB", offset)); -- } -- } -- } -+ public static class TTorT1Filter implements FilenameFilter { -+ public boolean accept(File dir, String name) { -+ return SunGraphicsEnvironment.ttFilter.accept(dir, name) || -+ SunGraphicsEnvironment.t1Filter.accept(dir, name); -+ } - } - - /* No need to keep consing up new instances - reuse a singleton. ---- openjdk.orig/jdk/src/windows/native/sun/font/fontpath.c Fri Jun 25 11:53:15 2010 -0700 -+++ openjdk/jdk/src/windows/native/sun/font/fontpath.c Mon Aug 04 18:50:43 2008 +0400 -@@ -153,7 +153,8 @@ static int CALLBACK EnumFontFacesInFamil - JNIEnv *env = fmi->env; - jstring fullname, fullnameLC; - -- if (FontType != TRUETYPE_FONTTYPE) { -+ /* Both Vista and XP return DEVICE_FONTTYPE for OTF fonts */ -+ if (FontType != TRUETYPE_FONTTYPE && FontType != DEVICE_FONTTYPE) { - return 1; - } - -@@ -227,7 +228,8 @@ static int CALLBACK EnumFontFacesInFamil - JNIEnv *env = fmi->env; - jstring fullname, fullnameLC; - -- if (FontType != TRUETYPE_FONTTYPE) { -+ /* Both Vista and XP return DEVICE_FONTTYPE for OTF fonts */ -+ if (FontType != TRUETYPE_FONTTYPE && FontType != DEVICE_FONTTYPE) { - return 1; - } - -@@ -274,7 +276,8 @@ static int CALLBACK EnumFamilyNamesA( - jstring familyLC; - LOGFONTA lfa; - -- if (FontType != TRUETYPE_FONTTYPE) { -+ /* Both Vista and XP return DEVICE_FONTTYPE for OTF fonts */ -+ if (FontType != TRUETYPE_FONTTYPE && FontType != DEVICE_FONTTYPE) { - return 1; - } - -@@ -323,7 +326,8 @@ static int CALLBACK EnumFamilyNamesW( - int slen; - LOGFONTW lfw; - -- if (FontType != TRUETYPE_FONTTYPE) { -+ /* Both Vista and XP return DEVICE_FONTTYPE for OTF fonts */ -+ if (FontType != TRUETYPE_FONTTYPE && FontType != DEVICE_FONTTYPE) { - return 1; - } - /* wprintf(L"FAMILY=%s charset=%d FULL=%s\n", */ -@@ -383,15 +387,16 @@ static int CALLBACK EnumFamilyNamesW( - * Also if a Font has a name for this locale that name also - * exists in the registry using the appropriate platform encoding. - * What do we do then? -- */ -- --/* static const wchar_t W_TTSUFFIX[] = L" (TrueType)"; */ --/* static const char C_TTSUFFIX[] = " (TrueType)"; */ --/* static int TTSLEN = 11; hard-coded - be careful */ --static BOOL RegistryToBaseTTNameA(LPCSTR name) { -+ * -+ * Note: OpenType fonts seems to have " (TrueType)" suffix on Vista -+ * but " (OpenType)" on XP. -+ */ -+ -+static BOOL RegistryToBaseTTNameA(LPSTR name) { - static const char TTSUFFIX[] = " (TrueType)"; -+ static const char OTSUFFIX[] = " (OpenType)"; - int TTSLEN = strlen(TTSUFFIX); -- char *match; -+ char *suffix; - - int len = strlen(name); - if (len == 0) { -@@ -403,19 +408,21 @@ static BOOL RegistryToBaseTTNameA(LPCSTR - if (len <= TTSLEN) { - return FALSE; - } -- match = strstr(name, TTSUFFIX); -- if ((match != NULL) && (match == name+(len-TTSLEN))) { -- match[0] = '\0'; /* truncate name */ -+ -+ /* suffix length is the same for truetype and opentype fonts */ -+ suffix = name + len - TTSLEN; -+ if (strcmp(suffix, TTSUFFIX) == 0 || strcmp(suffix, OTSUFFIX) == 0) { -+ suffix[0] = '\0'; /* truncate name */ - return TRUE; -- } else { -- return FALSE; -- } -+ } -+ return FALSE; - } - - static BOOL RegistryToBaseTTNameW(LPWSTR name) { - static const wchar_t TTSUFFIX[] = L" (TrueType)"; -+ static const wchar_t OTSUFFIX[] = L" (OpenType)"; - int TTSLEN = wcslen(TTSUFFIX); -- wchar_t *match; -+ wchar_t *suffix; - - int len = wcslen(name); - if (len == 0) { -@@ -427,13 +434,13 @@ static BOOL RegistryToBaseTTNameW(LPWSTR - if (len <= TTSLEN) { - return FALSE; - } -- match = wcsstr(name, TTSUFFIX); -- if ((match != NULL) && (match == name+(len-TTSLEN))) { -- match[0] = L'\0'; /* truncate name */ -+ /* suffix length is the same for truetype and opentype fonts */ -+ suffix = name + (len - TTSLEN); -+ if (wcscmp(suffix, TTSUFFIX) == 0 || wcscmp(suffix, OTSUFFIX) == 0) { -+ suffix[0] = L'\0'; /* truncate name */ - return TRUE; -- } else { -- return FALSE; -- } -+ } -+ return FALSE; - } - - static void registerFontA(GdiFontMapInfo *fmi, jobject fontToFileMap, -@@ -675,18 +682,19 @@ Java_sun_font_FontManager_populateFontFi - } - if (IS_NT) { - if (!RegistryToBaseTTNameW((LPWSTR)wname) ) { -- /* If the filename ends with ".ttf" also accept it. -+ /* If the filename ends with ".ttf" or ".otf" also accept it. - * Not expecting to need to do this for .ttc files. - * Also note this code is not mirrored in the "A" (win9x) path. - */ - LPWSTR dot = wcsrchr((LPWSTR)data, L'.'); -- if (dot == NULL || (wcsicmp(dot, L".ttf") != 0)) { -+ if (dot == NULL || ((wcsicmp(dot, L".ttf") != 0) -+ && (wcsicmp(dot, L".otf") != 0))) { - continue; /* not a TT font... */ - } - } - registerFontW(&fmi, fontToFileMap, (LPWSTR)wname, (LPWSTR)data); - } else { -- if (!RegistryToBaseTTNameA(cname) ) { -+ if (!RegistryToBaseTTNameA((LPSTR)cname)) { - continue; /* not a TT font... */ - } - registerFontA(&fmi, fontToFileMap, cname, (LPCSTR)data); -
--- a/patches/openjdk/6795060-icu_crash.patch Thu Aug 12 19:07:43 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -# HG changeset patch -# User srl -# Date 1280876869 -3600 -# Node ID 80a618f36d003b3e64fe8dd86f723d980db0d0bc -# Parent ea703df7276249b3080412d77bf4c3efc1b623a8 -6795060: VM crash on Linux in ICU layout library when processing \u0DDD (Sinhalese) -Reviewed-by: igor, prr - -diff -r ea703df72762 -r 80a618f36d00 src/share/native/sun/font/layout/IndicClassTables.cpp ---- openjdk.orig/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp Mon Jul 26 13:05:38 2010 -0700 -+++ openjdk/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp Wed Aug 04 00:07:49 2010 +0100 -@@ -279,7 +279,7 @@ - - static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable}; - --static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable}; -+static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable}; - - // - // IndicClassTable addresses -diff -r ea703df72762 -r 80a618f36d00 test/java/awt/font/TextLayout/TestSinhalaChar.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/jdk/test/java/awt/font/TextLayout/TestSinhalaChar.java Wed Aug 04 00:07:49 2010 +0100 -@@ -0,0 +1,71 @@ -+/* -+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ * -+ */ -+ -+/* @test @(#)TestSinhalaChar.java -+ * @summary verify lack of crash on U+0DDD. -+ * @bug 6795060 -+ */ -+ -+import javax.swing.*; -+import javax.swing.border.LineBorder; -+import java.awt.*; -+import java.awt.event.ActionEvent; -+ -+public class TestSinhalaChar { -+ public static void main(String[] args) { -+ SwingUtilities.invokeLater(new Runnable() { -+ public void run() { -+ new TestSinhalaChar().run(); -+ } -+ }); -+ } -+ public static boolean AUTOMATIC_TEST=true; // true; run test automatically, else manually at button push -+ -+ private void run() { -+ JFrame frame = new JFrame("Test Character (no crash = PASS)"); -+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); -+ JPanel panel = new JPanel(); -+ final JLabel label = new JLabel("(empty)"); -+ label.setSize(400, 100); -+ label.setBorder(new LineBorder(Color.black)); -+ label.setFont(new Font("Lucida Bright", Font.PLAIN, 12)); -+ if(AUTOMATIC_TEST) { /* run the test automatically (else, manually) */ -+ label.setText(Character.toString('\u0DDD')); -+ } else { -+ JButton button = new JButton("Set Char x0DDD"); -+ button.addActionListener(new AbstractAction() { -+ public void actionPerformed(ActionEvent actionEvent) { -+ label.setText(Character.toString('\u0DDD')); -+ } -+ }); -+ panel.add(button); -+ } -+ panel.add(label); -+ -+ frame.getContentPane().add(panel); -+ frame.pack(); -+ frame.setVisible(true); -+ } -+} -+
--- a/patches/openjdk/6954424-opentype_javadoc.patch Thu Aug 12 19:07:43 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - -# HG changeset patch -# User prr -# Date 1274975625 25200 -# Node ID acb763ebef9585000dda40e379d4e615be25c6b1 -# Parent 80a618f36d003b3e64fe8dd86f723d980db0d0bc -6954424: Support OpenType/CFF fonts in JDK 7 -Reviewed-by: bae, igor - ---- openjdk.orig/jdk/src/share/classes/java/awt/Font.java Wed Aug 04 00:07:49 2010 +0100 -+++ openjdk/jdk/src/share/classes/java/awt/Font.java Thu May 27 08:53:45 2010 -0700 -@@ -325,6 +325,10 @@ public class Font implements java.io.Ser - * 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 - */ - -