JDK-4708165 : Swing text editor pane: problems for line distance when resize font size
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2002-06-26
  • Updated: 2006-02-21
Related Reports
Relates :  
Description
hopper 15
Turbo Linux7.0 zh GB18030
testcase: GlobalSuite v1.3 b08

1) run "./run_gs.sh test/font-render/swing/three/JEditorPaneTest.java"
2) open attachment file.
3) Choose all char with mouse, change it's font size to 24.
4) choose first six char, change it's font size to 8.

Then will see the distance between 5th char and 6th char is strange, see attachment pic.

Comments
EVALUATION This is reproducible in the Swing Stylepad demo on solaris in English locale and acc. to the Swing team this is not a bug. The user did not select the newline in resizing the range of characters. Consequently the newline is still at the original pt size. The newline is on the same line as the highlighting selection ended. You would want and expect the line height to be as large as the largest text on the line This behaviour is more obvious if that line contains additional printable characters and the selection ends part way through the line. The visual appearance is a little confusing however so I will pass this bug to the swing team for determination if this behaviour is what is intended/ideal. ###@###.### 2002-06-26 ============================ Name: pzR10082 Date: 10/23/2002 When a line ends with a newline symbol, its height cannot be less than height of the newline. This is OK. However, the text package sometimes inserts newlines in documents (e.g. the last symbol is always newline). These newlines can have different font attributes, or no font attributes at all, so they can alter visual appearance of a line of text. Similar problem is reported in bug 4624069. ###@###.### 2002-10-23 ======================================================================
23-10-2002