'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 21 November 2016 at 11:47:51 am'! !CompositionScanner methodsFor: 'stop conditions' stamp: 'sumim 8/31/2016 16:23'! crossedX "There is a word that has fallen across the right edge of the composition rectangle. This signals the need for wrapping which is done to the last space that was encountered, as recorded by the space stop condition, or any other breakable character if the language permits so." pendingKernX := 0. (spaceIndex isNil or: [spaceIndex <= line first]) ifTrue: [ "Any breakable point in this line. Just wrap last character." spaceIndex := lastIndex - 1. lineHeightAtSpace := lineHeight. baselineAtSpace := baseline. ]. lastBreakIsNotASpace ifTrue: ["In some languages line break is possible before a non space." ^self wrapAtLastBreakable]. spaceCount >= 1 ifTrue: ["The common case. there is a space on the line." ^self wrapAtLastSpace]. "Neither internal nor trailing spaces -- almost never happens." self advanceIfFirstCharOfLine. ^self wrapHere! ! !LanguageEnvironment class methodsFor: 'accessing' stamp: 'sumim 11/24/2015 17:50'! isAlphaNumeric: char ^ self charsetClass isAlphaNumeric: char. ! ! !LanguageEnvironment class methodsFor: 'casing' stamp: 'sumim 11/21/2016 11:46'! toCasefold: aWideString ^self charsetClass toCasefold: aWideString! ! !LanguageEnvironment class methodsFor: 'casing' stamp: 'sumim 11/21/2016 11:46'! toLowercase: aWideString ^self charsetClass toLowercase: aWideString! ! !LanguageEnvironment class methodsFor: 'casing' stamp: 'sumim 11/21/2016 11:46'! toLowercaseCode: integerValue ^self charsetClass toLowercaseCode: integerValue! ! !LanguageEnvironment class methodsFor: 'casing' stamp: 'sumim 11/21/2016 11:46'! toUppercase: aWideString ^self charsetClass toUppercase: aWideString! ! !LanguageEnvironment class methodsFor: 'casing' stamp: 'sumim 11/21/2016 11:46'! toUppercaseCode: integerValue ^self charsetClass toUppercaseCode: integerValue! ! !JapaneseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'sumim 8/29/2016 12:41'! clipboardInterpreterClass | platformName osVersion | platformName := Smalltalk platformName. osVersion := Smalltalk osVersion. (platformName = 'Win32' and: [osVersion = 'CE']) ifTrue: [^NoConversionClipboardInterpreter]. platformName = 'Win32' ifTrue: [^UTF8ClipboardInterpreter]. platformName = 'Mac OS' ifTrue: [^MacShiftJISClipboardInterpreter]. ^platformName = 'unix' ifTrue: [(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) ifTrue: [MacShiftJISClipboardInterpreter] ifFalse: [UnixJPClipboardInterpreter]] ifFalse: [ NoConversionClipboardInterpreter ]! ! !JapaneseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'sumim 11/16/2015 09:20'! systemConverterClass | platformName osVersion encoding | platformName := Smalltalk platformName. osVersion := Smalltalk osVersion. platformName = 'Win32' ifTrue: [^UTF8TextConverter]. platformName = 'ZaurusOS' ifTrue: [^ShiftJISTextConverter]. platformName = 'Mac OS' ifTrue: [^('10*' match: osVersion) ifTrue: [UTF8TextConverter] ifFalse: [ShiftJISTextConverter]]. platformName = 'unix' ifTrue: [encoding := X11Encoding encoding. encoding ifNil: [^EUCJPTextConverter]. (encoding = 'utf-8') ifTrue: [^UTF8TextConverter]. (encoding = 'shiftjis' or: [ encoding = 'sjis' ]) ifTrue: [^ShiftJISTextConverter]. ^EUCJPTextConverter]. ^MacRomanTextConverter! ! !StrikeFontSet methodsFor: 'copying' stamp: 'yo 9/17/2002 17:15'! copy | s a | s := self class new. s name: self name. s emphasis: self emphasis. s reset. a := Array new: fontArray size. 1 to: a size do: [:i | a at: i put: (fontArray at: i) copy. ]. s fontArray: a. ^ s. ! ! !UTF32JPInputInterpreter methodsFor: 'as yet unclassified' stamp: 'sumim 11/15/2015 17:54'! nextCharFrom: sensor firstEvt: evtBuf | keyValue mark | keyValue := evtBuf at: 6. keyValue = 0 ifTrue: [keyValue := evtBuf at: 3]. mark := self japaneseSpecialMark: keyValue. mark notNil ifTrue: [^ mark]. keyValue < 256 ifTrue: [^ (Character value: keyValue) squeakToIso]. ^ Character leadingChar: JapaneseEnvironment leadingChar code: keyValue! !