-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.0
-
beta
-
generic
-
generic
-
Verified
Name: jh34982 Date: 10/26/99
Text layout encompasses a number of services required for properly
rendering and manipulating text in various languages. Such services
include choosing the appropriate positions and shapes of character
glyphs, measuring dimensions of text, hit testing, cursor movement,
and so on. Many languages require features not commonly required for
simple English rendering, such as reordering, ligatures, accent
placement, and multiple character shapes.
Text layout depends on information from the font system, principally
java.awt.Font and java.awt.font.GlyphVector. Layout is performed by
the graphics system (java.awt.Graphics and java.awt.Graphics2D) to
render text, and by java.awt.font.TextLayout to both render text and
provide metric, hit testing, and cursor movement data. It is also
performed by Swing text components (javax.swing.text.JTextComponent).
There are several areas that need improvement:
- accents are not properly positioned
- languages requiring ligatures or contextual reordering aren't
supported
- language-appropriate rendering is not performed as the language
and locale are not identified as part of the rendering process
- Swing's only public access to layout support is through TextLayout,
which causes inefficiencies when both perform the same text analysis
- there are multiple internal text pathways, leading to maintenance
difficulties, inefficiences, unwanted variations in behavior, and
bugs
- composite fonts introduce problems in layout and rendering at the
native level
The proposal is to stage a solution to these problems over time. The
initial steps are to enhance the internal native implementation to
enable more use of font information in performing layout, and to
provide public API to more layout processes and data so that Swing can
access it. Later steps involve resolving the multiple internal text
paths, explicitly distinguishing and formalizing the distinction
between composite (font.properties) fonts and 'real' fonts, and more
clearly distinguishing in the native code between the functions of
fonts, font strikes, glyph caches, rasterization, and layout.
======================================================================