JDK-8050404 : Syriac fonts not supported properly in Java (AWT/Swing)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2012-09-25
  • Updated: 2016-07-01
  • Resolved: 2016-07-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
Microsoft Windows [Version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
The syriac fonts are not properly supported in AWT and Swing text components (e.g. TextArea, JTextArea).

There's a report on the web made by someone a long time ago (2006) which details the problems (images included) with Java/Swing and Syriac writing:
http://nazianzos.fltr.ucl.ac.be/ReportSyriac.htm
Section "The problem when displaying syriac characters in java"
The problems are the same even now in Java SE 6u35 and 7u7.

The main problem that we found is that, even when the fonts work (tested with "Estrangelo Edessa" and "Estrangelo Talada"), the characters in a word are not linked together.

  Interestingly enough they seem to work fine within TextField.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The characters in each word should be linked together.
Copy the Syriac text from the running application and paste it into Notepad/Wordpad. You will see how the characters should look (correctly linked).
ACTUAL -
The characters in each word are not linked together.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

  public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    final JTextArea text = new JTextArea();
    Font m_Font = new Font ("Estrangelo Edessa", Font.PLAIN, 30);
    text.setFont( m_Font );
    text.setText( "\u0712\u072A\u071D\u072B\u071D\u072C \u0710\u071D\u072C\u0718\u0717\u071D \u0717\u0718\u0710 \u0721\u0720\u072C\u0710\n" +
    		"\u071f\u072c\u0712\u071d\u0722\u0722 \u072c\u0718\u0712 \u0722\u0712\u071d\u0718\u0308\u072c\u0710 \u0715\u0726\u0720\u0720\u0718\u0308\u0723\u0718\u0726\u0710 \u071a\u0722\u0308\u0726\u0710 \u0710\u071d\u071f \u0715\u0712\u0726\u0723\u071d\u0308\u0729\u072c\u0710");
    
    frame.getContentPane().add(new JScrollPane(text));
    frame.setSize(new Dimension(600, 200));
    frame.setVisible(true);
  }
---------- END SOURCE ----------

Comments
Confirmed as fixed in JDK 9 on Windows 7 by the harfbuzz integration. Closing as a duplicate.
01-07-2016

Fixed by Harfbuzz
21-11-2015

Verified this is fixed by 8143177 harfbuzz!
21-11-2015

And further to the above JDK's font code therefore does not attempt to perform layout on this range. JDK 9 may use harfbuzz which might support this script, in which case we can add it then. Adding for consideration in 9
14-07-2014

EVALUATION The problem is that ICU opentype layout does not support Syriac layout. There's an open ICU ticket on this :- http://bugs.icu-project.org/trac/ticket/2387 Its not clear that this is a priority as its a 'dead' language, although (if I believe wikipedia, which isn't a given) apparently its still used as the liturgical language of Syriac Christianity.
25-09-2012