Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325906 - TextLayout with width smaller than word on MacOS X with Carbon adds an extra break before the word
Summary: TextLayout with width smaller than word on MacOS X with Carbon adds an extra ...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact: Lakshmi P Shanmugam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-21 16:49 EDT by Hugo Corbucci CLA
Modified: 2012-06-21 14:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Corbucci CLA 2010-09-21 16:49:48 EDT
Build Identifier: 20100617-1415

This a platform window system specific bug. It does not happen on Windows or Cocoa.
The problem is on line 402 of TextLayout class for carbon in the computeRuns():void method.
There is a call to "OS.ATSUGetSoftLineBreaks(layout, 0, OS.kATSUToTextEnd, count, breaks, null);" which returns a break on character index 1 if the first word wraps without spaces.

Reproducible: Always

Steps to Reproduce:
1. Create a StyledText with SWT.WRAP.
2. Type in a very long word that wraps without spaces.
3. As soon as you type the character that triggers the wrap, you will notice that the word is drawn one line below where it should be.
Comment 1 Scott Kovatch CLA 2010-09-21 19:42:19 EDT
This is Carbon, so it may not be addressed as we're trying to phase out 3.7. Over to Silenio.
Comment 2 Silenio Quarti CLA 2012-06-21 14:30:38 EDT
Closing report, platform is discontinued.

Works on cocoa.