Community
Participate
Working Groups
[3.6.0 and 3.6.1] Create a mini snippet with just a StyledText in a shell: StyledText styledText = new StyledText(shell, SWT.V_SCROLL | SWT.H_SCROLL); Enter the following characters and observe where the cursor moves after each character: abcdeffg Note that after entering the second 'f' the cursor is in the wrong position. Happens for the ligature 'fi' as well.
I'm pretty sure the auto-conversion to ligature behavior can be disabled. TextEdit.app, for example, doesn't do this by default.
Btw, one place in Eclipse where this can be observed is in the CVS Commit dialog.
I very quickly try adding this line: attrStr.addAttribute(OS.NSKernAttributeName, NSNumber.numberWithInt(0), range); to TextLayout#computeRuns() but it didn't work, more investigation is needed. see http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html
(In reply to comment #3) > I very quickly try adding this line: > > attrStr.addAttribute(OS.NSKernAttributeName, NSNumber.numberWithInt(0), range); > to TextLayout#computeRuns() but it didn't work, more investigation is needed. Try NSLigatureAttributeName with a value of 0 instead. "NSLigatureAttributeName NSNumber containing integer Default 1, standard ligatures; 0, no ligatures; 2, all ligatures"
(In reply to comment #4) > (In reply to comment #3) > > I very quickly try adding this line: > > > > attrStr.addAttribute(OS.NSKernAttributeName, NSNumber.numberWithInt(0), range); > > to TextLayout#computeRuns() but it didn't work, more investigation is needed. > Try NSLigatureAttributeName with a value of 0 instead. > "NSLigatureAttributeName > NSNumber containing integer > Default 1, standard ligatures; 0, no ligatures; 2, all ligatures" thank you sir, that worked. I was afraid that no ligatures was going to break lam-alef ligatures but it all worked fine. I'll clean my workspace tomorrow morning and release the fix.
Fixed in HEAD > 20100916