harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-4641) [classlib][awt][font] Harmony has problem with some fonts in Fedora
Date Tue, 04 Sep 2007 11:52:45 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexei Zakharov reassigned HARMONY-4641:
----------------------------------------

    Assignee: Alexei Zakharov

> [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  <Generated stub>
>   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.


Mime
View raw message