Buggy code:
if ( ( start >= 0 ) || ( i == lineStart ) ) break ; run = allRuns [ ( -- i ) ] ; start = ( run . length ) - 1 ; } if ( ( start == 0 ) && ( i != lineStart ) ) { run = allRuns [ ( -- i ) ] ; } else if ( ( start <= 0 ) && ( i == lineStart ) ) { i = firstIndice ; run = allRuns [ i ] ; start = Math . max ( 1 , firstStart ) ; } chars = new char [ run . length ] ; text . getChars ( run . start , ( ( run . start ) + ( run . length ) ) , chars , 0 ) ; while ( start < ( run . length ) ) { if ( ! ( Compatibility . isWhitespace ( chars [ start ] ) ) ) break ; start ++ ; } if ( ( 0 < start ) && ( start < ( run . length ) ) ) { TextLayout . StyleItem newRun = new TextLayout . StyleItem ( ) ; newRun . start = ( run . start ) + start ; newRun . length = ( run . length ) - start ; newRun . style = run . style ; run . length = start ; place ( run ) ; place ( newRun ) ; TextLayout . StyleItem [ ] newAllRuns = new TextLayout . StyleItem [ ( allRuns . length ) + 1 ] ; System . arraycopy ( allRuns , 0 , newAllRuns , 0 , ( i + 1 ) ) ; System . arraycopy ( allRuns , ( i + 1 ) , newAllRuns , ( i + 2 ) , ( ( ( allRuns . length ) - i ) - 1 ) ) ; allRuns = newAllRuns ; allRuns [ ( i + 1 ) ] = newRun ; } if ( i != ( ( allRuns . length ) - 2 ) ) { run . softBreak = run . lineBreak = true ; } } lineWidth += run . width ; if ( run . lineBreak ) { lineStart = i + 1 ; lineWidth = 0 ; lineCount ++ ; } } lineWidth = 0 ; runs = new TextLayout . StyleItem [ lineCount ] [ ] ; lineOffset = new int [ lineCount + 1 ] ; lineY = new int [ lineCount + 1 ] ; this . lineWidth = new int [ lineCount ] ; int lineRunCount = 0 ; int line = 0 ; int ascent = Math . max ( defaultAscent , this . ascent ) ; int descent = Math . max ( defaultDescent , this . descent ) ; TextLayout . StyleItem [ ] lineRuns = new TextLayout . StyleItem [ allRuns . length ] ; XFontStruct fontStruct ; for ( int i = 0 ; i < ( allRuns . length ) ; i ++ ) { TextLayout . StyleItem run = allRuns [ i ] ; lineRuns [ ( lineRunCount ++ ) ] = run ; lineWidth += run . width ; if ( ( run . style ) != null ) { int runAscent = 0 ; int runDescent = 0 ; if ( ( run . style . metrics ) != null ) { GlyphMetrics metrics = run . style . metrics ; runAscent = metrics . ascent ; runDescent = metrics . descent ; } else if ( ( run . style . font ) != null ) { fontStruct = getFontHeigth ( run . style . font ) ; runAscent = fontStruct . ascent ; runDescent = fontStruct . descent ; } <START_BUG> ascent = Math . max ( ascent , runAscent ) ; <END_BUG> descent = Math . max ( descent , ( runDescent - ( run . style . rise ) ) ) ; if ( ( run . style . rise ) != 0 ) { run . baseline += run . style . rise ; } } if ( ( run . lineBreak ) || ( i == ( ( allRuns . length ) - 1 ) ) ) { runs [ line ] = new TextLayout . StyleItem [ lineRunCount ] ; System . arraycopy ( lineRuns , 0 , runs [ line ] , 0 , lineRunCount ) ; TextLayout . StyleItem lastRun = runs [ line ] [ ( lineRunCount - 1 ) ] ; this . lineWidth [ line ] = lineWidth ; line ++ ; lineY [ line ] = ( ( ( lineY [ ( line - 1 ) ] ) + ascent ) + descent ) + ( lineSpacing ) ; lineOffset [ line ] = ( lastRun . start ) + ( lastRun . length ) ; lineRunCount = lineWidth = 0 ; ascent = Math . max ( defaultAscent , this . ascent ) ; descent = Math . max ( defaultDescent , this . descent ) ; } } } public void dispose ( ) { } public void draw ( GC gc , int x , int y ) { } public void draw ( GC gc , int x , int y , int selectionStart , int selectionEnd , Color selectionForeground , Color selectionBackground ) { } void freeRuns ( ) { } public int getAlignment ( ) { } public int getAscent ( ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int start , int end ) { } public int getDescent ( ) { } public Font getFont ( ) { } XFontStruct getFontHeigth ( Font font ) { } public int getIndent ( ) { } public boolean getJustify ( ) { } public int getLevel ( int offset ) { }

Fix:
ascent = Math . max ( ascent , ( runAscent + ( run . style . rise ) ) ) ;