Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 23649 invoked from network); 4 Sep 2007 15:23:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 15:23:06 -0000 Received: (qmail 2065 invoked by uid 500); 4 Sep 2007 15:23:00 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 1973 invoked by uid 500); 4 Sep 2007 15:23:00 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 1964 invoked by uid 99); 4 Sep 2007 15:23:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 08:23:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 15:23:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E49FE714187 for ; Tue, 4 Sep 2007 08:22:44 -0700 (PDT) Message-ID: <22543159.1188919364932.JavaMail.jira@brutus> Date: Tue, 4 Sep 2007 08:22:44 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4641) [classlib][awt][font] Harmony has problem with some fonts in Fedora In-Reply-To: <9191515.1187265811227.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov resolved HARMONY-4641. -------------------------------------- Resolution: Fixed Thanks Chunrong. BTW the issue is reproducible on Debian Linux as well. I've committed your patch at the repository revision 572707. Please verify it was committed as you expected. > [classlib][awt][font] Harmony has problem with some fonts in Fedora > ------------------------------------------------------------------- > > Key: HARMONY-4641 > URL: https://issues.apache.org/jira/browse/HARMONY-4641 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Linux32(Fedora) > Reporter: Chunrong Lai > Assignee: Alexei Zakharov > Attachments: H4641.fixed.patch, H4641.println.workaround.patch > > > This issue does not happen in Win32. > Here's the simple test demonstrating the problem, one needs to copy simsun.ttc from windows to /usr/share/fonts/simsun.ttf before run it: > import javax.swing.JFrame; > import javax.swing.JLabel; > import java.awt.*; > public class Test { > public static void main(String argv[]) { > JFrame frame = new JFrame("test"); > JLabel label = new JLabel("Hello World"); > final GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment(); > final String[] fonts = g.getAvailableFontFamilyNames(); > for (int i = 0; i < fonts.length; i ++) { > System.out.println("Font " + i + ": " + fonts[i]); > } > label.setFont(new Font("SimSun", Font.PLAIN, 32)); > > frame.add(label); > frame.pack(); > frame.setVisible(true); > } > } > Other VMs are OK with this example but Harmony crashes with below StackTrace > SIGSEGV in VM code. > Stack trace: > 0: ?? (??:-1) > 1: ?? (??:-1) > 2: Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_drawStringNative (/home/clai1/harmony.0723/trunk/working_classlib/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c:1496) > 3: 0x063DFAF4 > 4: org/apache/harmony/awt/gl/linux/DrawableTextRenderer.drawNormalString(Lorg/apache/harmony/awt/gl/CommonGraphics2D;Ljava/lang/String;DD)V (DrawableTextRenderer.java:132) > 5: org/apache/harmony/awt/gl/linux/DrawableTextRenderer.drawString(Ljava/awt/Graphics2D;Ljava/lang/String;FF)V (DrawableTextRenderer.java:63) > 6: org/apache/harmony/awt/gl/linux/XGraphics2D.drawString(Ljava/lang/String;FF)V (XGraphics2D.java:556) > 7: org/apache/harmony/awt/gl/CommonGraphics2D.drawString(Ljava/lang/String;II)V (CommonGraphics2D.java:654) > 8: javax/swing/plaf/basic/BasicGraphicsUtils.drawStringUnderlineCharAt(Ljava/awt/Graphics;Ljava/lang/String;III)V (BasicGraphicsUtils.java:144) > 9: org/apache/harmony/x/swing/Utilities.drawString(Ljava/awt/Graphics;Ljava/lang/String;IILjava/awt/FontMetrics;Ljava/awt/Color;I)V (Utilities.java:503) > 10: javax/swing/plaf/basic/BasicLabelUI.paintEnabledText(Ljavax/swing/JLabel;Ljava/awt/Graphics;Ljava/lang/String;II)V (BasicLabelUI.java:133) > 11: javax/swing/plaf/basic/BasicLabelUI.paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V (BasicLabelUI.java:99) > 12: javax/swing/plaf/ComponentUI.update(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V (ComponentUI.java:38) > 13: javax/swing/JComponent.paintComponent(Ljava/awt/Graphics;)V (JComponent.java:897) > It is also noticed that Harmony returns much less fonts from getAvailableFontFamilyNames(), compared to other VMs. > There are other fonts also have this issue, for example, AR PL ShanHeiSun Uni, PMingLiu, etc. We also notice that some fonts would be OK for such unage, Tahoma is such example. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.