Public bug reported:
Seems the arphic Chinese fonts in Dapper are not compatible to Sun
Java5. Using these fonts in Java leads to "broken java implementation".
I'm using jEdit in Dapper with sun-java5 (1.5.0-06-1). I found that the default setting of java fails to show Chinese fonts in font list. I then tried to copy the font files ("/usr/share/fonts/truetype/arphic/*.ttf") directly to the java font folder ("/usr/lib/jvm/java-1.5.0-sun/jre/lib/fonts"). Then I obtain the below error when using jEdit on a font selection dialog in "Utility" > "Global Option"> "Text Area":
---------------------------
[error] FontSelectorDialog: Broken Java implementation!
[error] FontSelectorDialog: java.lang.IllegalArgumentException
[error] FontSelectorDialog: at java.nio.Buffer.position(Buffer.java:218)
[error] FontSelectorDialog: at sun.font.TrueTypeFont.lookupName(TrueTypeFont.ja va:818)
[error] FontSelectorDialog: at sun.font.TrueTypeFont.getFamilyName(TrueTypeFont .java:884)
[error] FontSelectorDialog: at sun.java2d.SunGraphicsEnvironment.getAvailableFo ntFamilyNames(SunGraphicsEnvironment.java :476)
[error] FontSelectorDialog: at sun.java2d.SunGraphicsEnvironment.getAvailableFo ntFamilyNames(SunGraphicsEnvironment.java:494)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.FontSelectorDialog.getFontL ist( FontSelector.java:371)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.FontSelectorDialog.init(Fon tSelector.java:271)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.FontSelectorDialog.<init>(F ontSelector.java :198)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.FontSelector$ActionHandler. actionPerformed(FontSelector.java:152)
[error] FontSelectorDialog: at javax.swing.AbstractButton.fireActionPerformed(A bstractButton.java :1849)
[error] FontSelectorDialog: at javax.swing.AbstractButton$Handler.actionPerform ed(AbstractButton.java:2169)
[error] FontSelectorDialog: at javax.swing.DefaultButtonModel.fireActionPerform ed(DefaultButtonModel.java :420)
[error] FontSelectorDialog: at javax.swing.DefaultButtonModel.setPressed(Defaul tButtonModel.java:258)
[error] FontSelectorDialog: at javax.swing.plaf.basic.BasicButtonListener.mouse Released(BasicButtonListener.java :234)
[error] FontSelectorDialog: at java.awt.Component.processMouseEvent(Component.j ava:5488)
[error] FontSelectorDialog: at javax.swing.JComponent.processMouseEvent(JCompon ent.java:3126)
[error] FontSelectorDialog: at java.awt.Component.processEvent(Component.java:5 253)
[error] FontSelectorDialog: at java.awt.Container.processEvent(Container.java:1 966)
[error] FontSelectorDialog: at java.awt.Component.dispatchEventImpl(Component.j ava:3955)
[error] FontSelectorDialog: at java.awt.Container.dispatchEventImpl(Container.j ava:2024)
[error] FontSelectorDialog: at java.awt.Component.dispatchEvent(Component.java: 3803)
[error] FontSelectorDialog: at java.awt.LightweightDispatcher.retargetMouseEven t(Container.java:4212)
[error] FontSelectorDialog: at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3892)
[error] FontSelectorDialog: at java.awt.LightweightDispatcher.dispatchEvent (Con tainer.java:3822)
[error] FontSelectorDialog: at java.awt.Container.dispatchEventImpl(Container.j ava:2010)
[error] FontSelectorDialog: at java.awt.Window.dispatchEventImpl(Window.java:17 74)
[error] FontSelectorDialog: at java.awt.Component.dispatchEvent(Component.java: 3803)
[error] FontSelectorDialog: at java.awt.EventQueue.dispatchEvent(EventQueue.jav a:463)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpOneEventForHier archy(EventDispatchThread.java:242)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpEventsForHierar chy(EventDispatchThread.java:163)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpEventsForHierar chy(EventDispatchThread.java:153)
[error] FontSelectorDialog: at java.awt.Dialog$1.run(Dialog.java:517)
[error] FontSelectorDialog: at java.awt.Dialog$2.run(Dialog.java:545)
[error] FontSelectorDialog: at java.security.AccessController.doPrivileged (Nati ve Method)
[error] FontSelectorDialog: at java.awt.Dialog.show(Dialog.java:543)
[error] FontSelectorDialog: at java.awt.Component.show(Component.java:1300)
[error] FontSelectorDialog: at java.awt.Component.setVisible (Component.java:125 3)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.OptionsDialog.init(OptionsD ialog.java:349)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.OptionsDialog.<init>(Option sDialog.java :50)
[error] FontSelectorDialog: at org.gjt.sp.jedit.options.GlobalOptions.<init>(Gl obalOptions.java:39)
[error] FontSelectorDialog: at sun.reflect.NativeConstructorAccessorImpl.newIns tance0(Native Method)
[error] FontSelectorDialog: at sun.reflect.NativeConstructorAccessorImpl.newIns tance(NativeConstructorAccessorImpl.java:39)
[error] FontSelectorDialog: at sun.reflect.DelegatingConstructorAccessorImpl.ne wInstance(DelegatingConstructorAccessorImpl.java:27)
[error] FontSelectorDialog: at java.lang.reflect.Constructor.newInstance(Constr uctor.java:494)
[error] FontSelectorDialog: at bsh.Reflect.constructObject(Reflect.java:668)
[error] FontSelectorDialog: at bsh.BSHAllocationExpression.constructObject(BSHA llocationExpression.java:123)
[error] FontSelectorDialog: at bsh.BSHAllocationExpression.objectAllocation (BSH AllocationExpression.java:114)
[error] FontSelectorDialog: at bsh.BSHAllocationExpression.eval(BSHAllocationEx pression.java:62)
[error] FontSelectorDialog: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpressi on.java:102)
[error] FontSelectorDialog: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpressi on.java:47)
[error] FontSelectorDialog: at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
[error] FontSelectorDialog: at bsh.BSHBlock.eval(BSHBlock.java:80)
[error] FontSelectorDialog: at bsh.BshMethod.invokeImpl(BshMethod.java:349)
[error] FontSelectorDialog: at bsh.BshMethod.invoke(BshMethod.java:246)
[error] FontSelectorDialog: at bsh.BshMethod.invoke(BshMethod.java:171)
[error] FontSelectorDialog: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanSh ell.java:523)
[error] FontSelectorDialog: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShel lAction.java:76)
[error] FontSelectorDialog: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(I nputHandler.java:229)
[error] FontSelectorDialog: at org.gjt.sp.jedit.jEdit$3.invokeAction(jEdit.java :2910)
[error] FontSelectorDialog: at org.gjt.sp.jedit.EditAction$Wrapper.actionPerfor med(EditAction.java:216)
[error] FontSelectorDialog: at javax.swing.AbstractButton.fireActionPerformed(A bstractButton.java:1849)
[error] FontSelectorDialog: at javax.swing.AbstractButton$Handler.actionPerform ed(AbstractButton.java:2169)
[error] FontSelectorDialog: at javax.swing.DefaultButtonModel.fireActionPerform ed(DefaultButtonModel.java:420)
[error] FontSelectorDialog: at javax.swing.DefaultButtonModel.setPressed (Defaul tButtonModel.java:258)
[error] FontSelectorDialog: at javax.swing.AbstractButton.doClick(AbstractButto n.java:302)
[error] FontSelectorDialog: at javax.swing.plaf.basic.BasicMenuItemUI.doClick(B asicMenuItemUI.java :1000)
[error] FontSelectorDialog: at javax.swing.plaf.basic.BasicPopupMenuUI$Actions. doReturn(BasicPopupMenuUI.java:441)
[error] FontSelectorDialog: at javax.swing.plaf.basic.BasicPopupMenuUI$Actions. actionPerformed( BasicPopupMenuUI.java:415)
[error] FontSelectorDialog: at javax.swing.SwingUtilities.notifyAction(SwingUti lities.java:1571)
[error] FontSelectorDialog: at javax.swing.JComponent.processKeyBinding(JCompon ent.java :2763)
[error] FontSelectorDialog: at javax.swing.KeyboardManager.fireBinding(Keyboard Manager.java:255)
[error] FontSelectorDialog: at javax.swing.KeyboardManager.fireKeyboardAction(K eyboardManager.java:204)
[error] FontSelectorDialog: at javax.swing.JComponent.processKeyBindingsForAllC omponents(JComponent.java:2840)
[error] FontSelectorDialog: at javax.swing.JComponent.processKeyBindings(JCompo nent.java:2832)
[error] FontSelectorDialog: at javax.swing.JComponent.processKeyEvent(JComponen t.java:2726)
[error] FontSelectorDialog: at java.awt.Component.processEvent(Component.java:5 265)
[error] FontSelectorDialog: at java.awt.Container.processEvent(Container.java :1 966)
[error] FontSelectorDialog: at java.awt.Component.dispatchEventImpl(Component.j ava:3955)
[error] FontSelectorDialog: at java.awt.Container.dispatchEventImpl(Container.j ava:2024)
[error] FontSelectorDialog: at java.awt.Component.dispatchEvent(Component.java: 3803)
[error] FontSelectorDialog: at java.awt.KeyboardFocusManager.redispatchEvent(Ke yboardFocusManager.java:1810)
[error] FontSelectorDialog: at java.awt.DefaultKeyboardFocusManager.dispatchKey Event(DefaultKeyboardFocusManager.java:672)
[error] FontSelectorDialog: at java.awt.DefaultKeyboardFocusManager.preDispatch KeyEvent(DefaultKeyboardFocusManager.java:920)
[error] FontSelectorDialog: at java.awt.DefaultKeyboardFocusManager.typeAheadAs sertions(DefaultKeyboardFocusManager.java:798)
[error] FontSelectorDialog: at java.awt.DefaultKeyboardFocusManager.dispatchEve nt(DefaultKeyboardFocusManager.java:636)
[error] FontSelectorDialog: at java.awt.Component.dispatchEventImpl (Component.j ava:3841)
[error] FontSelectorDialog: at java.awt.Container.dispatchEventImpl(Container.j ava:2024)
[error] FontSelectorDialog: at java.awt.Window.dispatchEventImpl(Window.java:17 74)
[error] FontSelectorDialog: at java.awt.Component.dispatchEvent(Component.java: 3803)
[error] FontSelectorDialog: at java.awt.EventQueue.dispatchEvent(EventQueue.jav a:463)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpOneEventForHier archy(EventDispatchThread.java:242)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpEventsForHierar chy(EventDispatchThread.java:163)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpEvents (EventDis patchThread.java:157)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.pumpEvents(EventDis patchThread.java:149)
[error] FontSelectorDialog: at java.awt.EventDispatchThread.run(EventDispatchTh read.java:110)
-----------------------------------------
I removed these font file and jEdit work normally.
I then tried use other fonts then. First I obtain http://www.study-
area.org/apt/firefly-font/fireflysung-1.3.0.tar.gz and put the
fireflysung.ttf in the java font folder. jEdit worked normally with this
font selectable.
Also I happens to have a Fedora machine. I then tried to get the arphic
Chinese font from them. I tested download the font files
"/usr/share/font/zh_TW/TrueType/*.ttf" from Fedora to my Dapper machine.
I copy them to the java font folder and jEdit worked normally with these
fonts selectable.
You may find some more details in
http://www.ubuntuforums.org/showthread.php?t=233304
** Affects: dapper-backports (upstream)
Importance: Untriaged
Status: Unconfirmed
** Affects: sun-java5 (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
** Affects: ttf-arphic-ukai (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
** Affects: ttf-arphic-uming (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
** Also affects: ttf-arphic-ukai (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
** Also affects: ttf-arphic-uming (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
** Also affects: dapper-backports (upstream)
Importance: Untriaged
Status: Unconfirmed
--
broken java implementation for traditional Chinese fonts
https://launchpad.net/bugs/55970