You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/08/31 15:20:31 UTC

[jira] Created: (HARMONY-4713) [classlib][awt][swing] Far East fonts aren't displayed correctly

[classlib][awt][swing] Far East fonts aren't displayed correctly 
-----------------------------------------------------------------

                 Key: HARMONY-4713
                 URL: https://issues.apache.org/jira/browse/HARMONY-4713
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP, Windows Server 2003, DRLVM
            Reporter: Alexei Zakharov
            Assignee: Alexei Zakharov


By default Harmony does not display Chinese/Japanese letters correctly if they are used in Swing UI elements - button labels, menu entry names and etc.  At least if default Windows locale is not switched to Chinese/Japanese. 

This way, the following test displays empty squares on Harmony and valid hieroglyphs on RI:

SwingHello.java:
---
import java.awt.*;
import javax.swing.*;

public class SwingHello extends JFrame {
    private final static String TEXT = "\u4eca\u65e5\u306f";
    protected JLabel l;

    public SwingHello() {
        setLayout(new GridBagLayout());
        setSize(100, 100);
        l = new JLabel(TEXT);
        add(l);
    }

    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                SwingHello fr = new SwingHello();

                fr.setVisible(true);
            }
        });
    }
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4713) [classlib][awt][swing] Far East fonts aren't displayed correctly

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524646 ] 

Chunrong Lai commented on HARMONY-4713:
---------------------------------------


 I believe that this is a same issue as HARMONY-4526.
 If it is wrong please correct me.
 My intended solution is changing createDefaultFont() of WinFontManager.java and replacing the DEFAULT_NAME with specific Font_Name (switch locale: ......).

> [classlib][awt][swing] Far East fonts aren't displayed correctly 
> -----------------------------------------------------------------
>
>                 Key: HARMONY-4713
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4713
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP, Windows Server 2003, DRLVM
>            Reporter: Alexei Zakharov
>            Assignee: Alexei Zakharov
>
> By default Harmony does not display Chinese/Japanese letters correctly if they are used in Swing UI elements - button labels, menu entry names and etc.  At least if default Windows locale is not switched to Chinese/Japanese. 
> This way, the following test displays empty squares on Harmony and valid hieroglyphs on RI:
> SwingHello.java:
> ---
> import java.awt.*;
> import javax.swing.*;
> public class SwingHello extends JFrame {
>     private final static String TEXT = "\u4eca\u65e5\u306f";
>     protected JLabel l;
>     public SwingHello() {
>         setLayout(new GridBagLayout());
>         setSize(100, 100);
>         l = new JLabel(TEXT);
>         add(l);
>     }
>     public static void main(String[] args) {
>         javax.swing.SwingUtilities.invokeLater(new Runnable() {
>             public void run() {
>                 SwingHello fr = new SwingHello();
>                 fr.setVisible(true);
>             }
>         });
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4713) [classlib][awt][swing] Far East fonts aren't displayed correctly

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-4713.
------------------------------------

    Resolution: Duplicate

closing this issue as duplicate

> [classlib][awt][swing] Far East fonts aren't displayed correctly 
> -----------------------------------------------------------------
>
>                 Key: HARMONY-4713
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4713
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP, Windows Server 2003, DRLVM
>            Reporter: Alexei Zakharov
>            Assignee: Alexei Zakharov
>
> By default Harmony does not display Chinese/Japanese letters correctly if they are used in Swing UI elements - button labels, menu entry names and etc.  At least if default Windows locale is not switched to Chinese/Japanese. 
> This way, the following test displays empty squares on Harmony and valid hieroglyphs on RI:
> SwingHello.java:
> ---
> import java.awt.*;
> import javax.swing.*;
> public class SwingHello extends JFrame {
>     private final static String TEXT = "\u4eca\u65e5\u306f";
>     protected JLabel l;
>     public SwingHello() {
>         setLayout(new GridBagLayout());
>         setSize(100, 100);
>         l = new JLabel(TEXT);
>         add(l);
>     }
>     public static void main(String[] args) {
>         javax.swing.SwingUtilities.invokeLater(new Runnable() {
>             public void run() {
>                 SwingHello fr = new SwingHello();
>                 fr.setVisible(true);
>             }
>         });
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4713) [classlib][awt][swing] Far East fonts aren't displayed correctly

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524695 ] 

Alexei Zakharov commented on HARMONY-4713:
------------------------------------------

Chunrong, thanks. Looks like this issue is a duplication of HARMONY-4526.
As for solution, IMHO we can solve the original issue by creating appropriate font.properties files without touching the code at all. Please see my commnet to HARMONY-4526.

> [classlib][awt][swing] Far East fonts aren't displayed correctly 
> -----------------------------------------------------------------
>
>                 Key: HARMONY-4713
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4713
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP, Windows Server 2003, DRLVM
>            Reporter: Alexei Zakharov
>            Assignee: Alexei Zakharov
>
> By default Harmony does not display Chinese/Japanese letters correctly if they are used in Swing UI elements - button labels, menu entry names and etc.  At least if default Windows locale is not switched to Chinese/Japanese. 
> This way, the following test displays empty squares on Harmony and valid hieroglyphs on RI:
> SwingHello.java:
> ---
> import java.awt.*;
> import javax.swing.*;
> public class SwingHello extends JFrame {
>     private final static String TEXT = "\u4eca\u65e5\u306f";
>     protected JLabel l;
>     public SwingHello() {
>         setLayout(new GridBagLayout());
>         setSize(100, 100);
>         l = new JLabel(TEXT);
>         add(l);
>     }
>     public static void main(String[] args) {
>         javax.swing.SwingUtilities.invokeLater(new Runnable() {
>             public void run() {
>                 SwingHello fr = new SwingHello();
>                 fr.setVisible(true);
>             }
>         });
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.