Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4285083
Votes 0
Synopsis Add access to bidirectional text information
Category java:classes_2d
Reported Against 1.2 , merlin-beta , kestrel-beta
Release Fixed 1.4(merlin-beta)
State 10-Fix Delivered, Verified, request for enhancement
Priority: 4-Low
Related Bugs 4287461
Submit Date 26-OCT-1999
Description





The Unicode Bidirectional Algorithm is is currently implemented in two
places, sun.awt.font and in javax.swing.text.  There should be one
public implementation in java.text.  Swing wants to use a public API
to get this information, and the duplication of code is undesirable.

The Unicode Bidirectional Algorithm analyzes text using the Unicode
character properties, and determines the direction of runs of the
text.  This is necessary to properly display Hebrew and Arabic text in
the correct order.

The current implementation is all Java, but it would be useful to have
efficient access from the native font code so that Hebrew and Arabic text
can be more efficiently rendered. We would use a native implementation
and provide Java access through JNI.  We have a C++ implementation
available.

The java.lang.Character class does not provide access to a character's
bidirectional property.  As Character is the interface for all Unicode
character information, it should be extended to add access to this
information for Java clients.  This is requested in bug 4132045.

======================================================================
Work Around
N/A
Evaluation
The simplest thing to do is make the current class public in java.text.  It has more API than we might want to expose, though, and the API may hinder changes to the implementation in the future.

Simplifying the API will require some changes to the clients (Swing and Java2D TextLayout) in places where they access the removed API.  These changes should be relatively few, however.

Wrapping native code has the advantages that the native code is more current and would be usable by java2d.  I've written the wrapper but have not completed testing on it-- this would take about a week.  The change to java2d to call the native code (instead of throwing an exception each time it is asked to render a Hebrew string, as happens currently) could be done at a later date.
 xxxxx@xxxxx  2000-04-25




Committing to merlin release


======================================================================
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang