I found solution. I comment line of code in scanning loop in MultiCharacterScanner>>scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta ... "encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]." ... Without this commenting scanning process not register breakage at space when scanning russian text. (because encoding is differ from startEncoding. Encoding for space is 0 but for startEncoding is leadingChar of not ascii russian text). I dont now meaning of this code line. But now I have correct wrapping behavior. I know that multilingual package have many newly versions. All containes that strange code line. I open Issue http://code.google.com/p/pharo/issues/detail?id=2608 30 иÑÐ½Ñ 2010 г. 9:55:37 UTC+4 полÑзоваÑÐµÐ»Ñ dionisiydk <dionisiydk@gmail.com>напиÑал:
No. #isSeparator message not used for wrapping. Wrapping logic implemented in MultiCompositionScanner and dont use #isSeparator
2010/6/30 Igor Stasenko <siguctua@gmail.com>
2010/6/30 Denis Kudriashov <dionisiydk@gmail.com>:
I use Pharo 1.1 rc2 10.06
I found strange behavior of wrapping text with TTFont (russian text) in TextMorph.
I dont know how to reproduce it. But I see it in my application.
I have prototype button with TextMorph as it label. And I do many of:
aPanel add: prototype veryDeepCopy contentsWrapped: someRussianText.
And I see that text on label dont wrapped by words. It is wrapped only by label bounds. And words in text became break. Example. I expect
i think it wraps text based on #isSeparator test. And any russian (as well as any other non-ascii characters), afaik is treated as separators. That's why it wraps on any letter.
"one two three"
But I see
"one two th ree "
Its work correct for english text. But for russian not.
And I cant reproduce it by execution code separetelly from my application (aPanel add: prototype veryDeepCopy contentsWrapped: someRussianText).
I try many experiments with debuger and inspector. But I cant fix that. Wrapping text code is not simple. Maybe somebody tell me what place I need learn/inspect for fixing this bug?
And I found that If I insert char by keyboard at the end of word "two" (see example) text wrapped correctly: "one twoNEW three "
And this behavior correct in Pharo 1.0.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project