| Summary: | TextLayout lacks line height configuration | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Hugo Corbucci <nightao> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | eclipse.felipe | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Hugo Corbucci
Created attachment 192027 [details]
patch that includes code to add line height configuration support
This patch creates the binding between native functions and cocoa through OS and NSMutableParagraphStyle. It also adds setters for minumimLineHeight and maximumLineHeight in the TextLayout class. There is no implementation for other platforms than macosx cocoa.
can you achieve the same look using setAscent / setDescent ? No. Ascent and Descent can only be used to increase the lineHeight above the default. In this case, cocoa's default value is 14 and it should be 12 (to match carbon). (In reply to comment #3) > No. Ascent and Descent can only be used to increase the lineHeight above the > default. In this case, cocoa's default value is 14 and it should be 12 (to > match carbon). You want to force the line height to be smaller then ? why do you need cocoa and carbon to look the same ? (In reply to comment #4) > You want to force the line height to be smaller then ? > > why do you need cocoa and carbon to look the same ? We are developing an Eclipse RCP application with a WYSIWYG text editor with pages. With cocoa's bigger line height, less text fits within one page and inccurs into more pages (20% more) existing for a same text. This change impacts also whenever comparing printed text from our app to any other text editor. TextEdit itself won't match the default cocoa behavior. Given the same text, TextEdit's result is smaller because it uses a smaller line height than the 14 pixels value returned by the SWT binding. We're trying to migrate the app from carbon to cocoa but we need to keep control over the amount of pages of a same document. A small difference would be acceptable but the difference is caused by this extra line height which we would like to change. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant please remove the stalebug whiteboard tag. |