lists.squeakfoundation.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Packages
September 2013
----- 2024 -----
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
packages@lists.squeakfoundation.org
1 participants
423 discussions
Start a n
N
ew thread
The Trunk: Multilingual-nice.178.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.178.mcz
==================== Summary ==================== Name: Multilingual-nice.178 Author: nice Time: 27 September 2013, 2:42:55.746 am UUID: 72088458-95a8-4a56-b35f-e2a97349df16 Ancestors: Multilingual-nice.177, Multilingual-tpr.177 Merge nice.177 and some of tpr.177 But: don't remove scanSelector Don't remove method that was freshly moved from Morphic Move breakAtSpace := false initialization elsewhere =============== Diff against Multilingual-nice.177 =============== Item was changed: ----- Method: EncodedCharSet class>>scanSelector (in category 'accessing - displaying') ----- scanSelector + "Note: this message can be sent both to an EncodedCharSet or a LanguageEnvironment." - "This appears to be redundant - possibly once used as a default and now usurped by LanguageEnvironmet class>scanSelector ?" ^ #scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:! Item was changed: ----- Method: MultiCharacterScanner>>isBreakableAt:in:in: (in category 'scanner methods') ----- isBreakableAt: index in: sourceString in: encodingClass + "check with the encoding whether the character at index is a breakable character- only the JISX0208 & JapaneseEnvironment will ever return true, so only the scanJapaneseCharacters... method calls this" - ^ encodingClass isBreakableAt: index in: sourceString. ! Item was changed: ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category 'scanning') ----- composeFrom: startIndex inRectangle: lineRectangle firstLine: firstLine leftSide: leftSide rightSide: rightSide "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | "Set up margins" leftMargin := lineRectangle left. leftSide ifTrue: [leftMargin := leftMargin + (firstLine ifTrue: [textStyle firstIndent] ifFalse: [textStyle restIndent])]. destX := spaceX := leftMargin. firstDestX := destX. rightMargin := lineRectangle right. rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. lastIndex := startIndex. "scanning sets last index" destY := lineRectangle top. lineHeight := baseline := 0. "Will be increased by setFont" self setStopConditions. "also sets font" runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) rectangle: lineRectangle. spaceCount := 0. + breakAtSpace := false. self handleIndentation. leftMargin := destX. line leftMargin: leftMargin. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^ line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>composeLine:fromCharacterIndex:inParagraph: (in category 'scanning') ----- composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | destX := spaceX := leftMargin := aParagraph leftMarginForCompositionForLine: lineIndex. destY := 0. rightMargin := aParagraph rightMarginForComposition. leftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose']. lastIndex := startIndex. "scanning sets last index" lineHeight := textStyle lineGrid. "may be increased by setFont:..." baseline := textStyle baseline. - baselineY := destY + baseline. self setStopConditions. "also sets font" self handleIndentation. runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := TextLineInterval start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0. spaceCount := 0. + breakAtSpace := false. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>cr (in category 'stop conditions') ----- cr "Answer true. Set up values for the text line interval currently being composed." pendingKernX := 0. + (lastIndex < text size and: [(text at: lastIndex) = Character cr and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. - (lastIndex < text size and: [(text at: lastIndex) = CR and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - spaceX. ^true! Item was changed: ----- Method: MultiCompositionScanner>>endOfRun (in category 'stop conditions') ----- endOfRun "Answer true if scanning has reached the end of the paragraph. Otherwise step conditions (mostly install potential new font) and answer false." | runLength | lastIndex = text size ifTrue: [line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - destX. ^true] ifFalse: [ - "(text at: lastIndex) charCode = 32 ifTrue: [destX := destX + spaceWidth]." runLength := (text runLengthFor: (lastIndex := lastIndex + 1)). runStopIndex := lastIndex + (runLength - 1). self setStopConditions. ^false] ! Item was removed: - ----- Method: MultiCompositionScanner>>isBreakableAt:in:in: (in category 'multilingual scanning') ----- - isBreakableAt: index in: sourceString in: encodingClass - - ^ encodingClass isBreakableAt: index in: sourceString. - ! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category 'stop conditions') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: Multilingual-nice.178.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.178.mcz
==================== Summary ==================== Name: Multilingual-nice.178 Author: nice Time: 27 September 2013, 2:42:55.746 am UUID: 72088458-95a8-4a56-b35f-e2a97349df16 Ancestors: Multilingual-nice.177, Multilingual-tpr.177 Merge nice.177 and some of tpr.177 But: don't remove scanSelector Don't remove method that was freshly moved from Morphic Move breakAtSpace := false initialization elsewhere =============== Diff against Multilingual-nice.177 =============== Item was changed: ----- Method: EncodedCharSet class>>scanSelector (in category 'accessing - displaying') ----- scanSelector + "Note: this message can be sent both to an EncodedCharSet or a LanguageEnvironment." - "This appears to be redundant - possibly once used as a default and now usurped by LanguageEnvironmet class>scanSelector ?" ^ #scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:! Item was changed: ----- Method: MultiCharacterScanner>>isBreakableAt:in:in: (in category 'scanner methods') ----- isBreakableAt: index in: sourceString in: encodingClass + "check with the encoding whether the character at index is a breakable character- only the JISX0208 & JapaneseEnvironment will ever return true, so only the scanJapaneseCharacters... method calls this" - ^ encodingClass isBreakableAt: index in: sourceString. ! Item was changed: ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category 'scanning') ----- composeFrom: startIndex inRectangle: lineRectangle firstLine: firstLine leftSide: leftSide rightSide: rightSide "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | "Set up margins" leftMargin := lineRectangle left. leftSide ifTrue: [leftMargin := leftMargin + (firstLine ifTrue: [textStyle firstIndent] ifFalse: [textStyle restIndent])]. destX := spaceX := leftMargin. firstDestX := destX. rightMargin := lineRectangle right. rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. lastIndex := startIndex. "scanning sets last index" destY := lineRectangle top. lineHeight := baseline := 0. "Will be increased by setFont" self setStopConditions. "also sets font" runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) rectangle: lineRectangle. spaceCount := 0. + breakAtSpace := false. self handleIndentation. leftMargin := destX. line leftMargin: leftMargin. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^ line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>composeLine:fromCharacterIndex:inParagraph: (in category 'scanning') ----- composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | destX := spaceX := leftMargin := aParagraph leftMarginForCompositionForLine: lineIndex. destY := 0. rightMargin := aParagraph rightMarginForComposition. leftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose']. lastIndex := startIndex. "scanning sets last index" lineHeight := textStyle lineGrid. "may be increased by setFont:..." baseline := textStyle baseline. - baselineY := destY + baseline. self setStopConditions. "also sets font" self handleIndentation. runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := TextLineInterval start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0. spaceCount := 0. + breakAtSpace := false. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>cr (in category 'stop conditions') ----- cr "Answer true. Set up values for the text line interval currently being composed." pendingKernX := 0. + (lastIndex < text size and: [(text at: lastIndex) = Character cr and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. - (lastIndex < text size and: [(text at: lastIndex) = CR and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - spaceX. ^true! Item was changed: ----- Method: MultiCompositionScanner>>endOfRun (in category 'stop conditions') ----- endOfRun "Answer true if scanning has reached the end of the paragraph. Otherwise step conditions (mostly install potential new font) and answer false." | runLength | lastIndex = text size ifTrue: [line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - destX. ^true] ifFalse: [ - "(text at: lastIndex) charCode = 32 ifTrue: [destX := destX + spaceWidth]." runLength := (text runLengthFor: (lastIndex := lastIndex + 1)). runStopIndex := lastIndex + (runLength - 1). self setStopConditions. ^false] ! Item was removed: - ----- Method: MultiCompositionScanner>>isBreakableAt:in:in: (in category 'multilingual scanning') ----- - isBreakableAt: index in: sourceString in: encodingClass - - ^ encodingClass isBreakableAt: index in: sourceString. - ! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category 'stop conditions') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: Multilingual-nice.178.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.178.mcz
==================== Summary ==================== Name: Multilingual-nice.178 Author: nice Time: 27 September 2013, 2:42:55.746 am UUID: 72088458-95a8-4a56-b35f-e2a97349df16 Ancestors: Multilingual-nice.177, Multilingual-tpr.177 Merge nice.177 and some of tpr.177 But: don't remove scanSelector Don't remove method that was freshly moved from Morphic Move breakAtSpace := false initialization elsewhere =============== Diff against Multilingual-nice.177 =============== Item was changed: ----- Method: EncodedCharSet class>>scanSelector (in category 'accessing - displaying') ----- scanSelector + "Note: this message can be sent both to an EncodedCharSet or a LanguageEnvironment." - "This appears to be redundant - possibly once used as a default and now usurped by LanguageEnvironmet class>scanSelector ?" ^ #scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:! Item was changed: ----- Method: MultiCharacterScanner>>isBreakableAt:in:in: (in category 'scanner methods') ----- isBreakableAt: index in: sourceString in: encodingClass + "check with the encoding whether the character at index is a breakable character- only the JISX0208 & JapaneseEnvironment will ever return true, so only the scanJapaneseCharacters... method calls this" - ^ encodingClass isBreakableAt: index in: sourceString. ! Item was changed: ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category 'scanning') ----- composeFrom: startIndex inRectangle: lineRectangle firstLine: firstLine leftSide: leftSide rightSide: rightSide "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | "Set up margins" leftMargin := lineRectangle left. leftSide ifTrue: [leftMargin := leftMargin + (firstLine ifTrue: [textStyle firstIndent] ifFalse: [textStyle restIndent])]. destX := spaceX := leftMargin. firstDestX := destX. rightMargin := lineRectangle right. rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. lastIndex := startIndex. "scanning sets last index" destY := lineRectangle top. lineHeight := baseline := 0. "Will be increased by setFont" self setStopConditions. "also sets font" runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) rectangle: lineRectangle. spaceCount := 0. + breakAtSpace := false. self handleIndentation. leftMargin := destX. line leftMargin: leftMargin. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^ line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>composeLine:fromCharacterIndex:inParagraph: (in category 'scanning') ----- composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | destX := spaceX := leftMargin := aParagraph leftMarginForCompositionForLine: lineIndex. destY := 0. rightMargin := aParagraph rightMarginForComposition. leftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose']. lastIndex := startIndex. "scanning sets last index" lineHeight := textStyle lineGrid. "may be increased by setFont:..." baseline := textStyle baseline. - baselineY := destY + baseline. self setStopConditions. "also sets font" self handleIndentation. runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := TextLineInterval start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0. spaceCount := 0. + breakAtSpace := false. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>cr (in category 'stop conditions') ----- cr "Answer true. Set up values for the text line interval currently being composed." pendingKernX := 0. + (lastIndex < text size and: [(text at: lastIndex) = Character cr and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. - (lastIndex < text size and: [(text at: lastIndex) = CR and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - spaceX. ^true! Item was changed: ----- Method: MultiCompositionScanner>>endOfRun (in category 'stop conditions') ----- endOfRun "Answer true if scanning has reached the end of the paragraph. Otherwise step conditions (mostly install potential new font) and answer false." | runLength | lastIndex = text size ifTrue: [line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - destX. ^true] ifFalse: [ - "(text at: lastIndex) charCode = 32 ifTrue: [destX := destX + spaceWidth]." runLength := (text runLengthFor: (lastIndex := lastIndex + 1)). runStopIndex := lastIndex + (runLength - 1). self setStopConditions. ^false] ! Item was removed: - ----- Method: MultiCompositionScanner>>isBreakableAt:in:in: (in category 'multilingual scanning') ----- - isBreakableAt: index in: sourceString in: encodingClass - - ^ encodingClass isBreakableAt: index in: sourceString. - ! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category 'stop conditions') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: Morphic-nice.691.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.691.mcz
==================== Summary ==================== Name: Morphic-nice.691 Author: nice Time: 27 September 2013, 2:05:45.131 am UUID: e25c6256-260f-4f90-9826-bc204f8c6a30 Ancestors: Morphic-nice.690 Give some methods back the the (Multi)CharacterScanner =============== Diff against Morphic-nice.690 =============== Item was removed: - ----- Method: CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - (self perform: stopCondition) - ifTrue: [^ line lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading]] repeat! Item was removed: - ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text Support-scanning') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - firstDestX := destX. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - self perform: stopCondition] whileFalse. - - ^ line - lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category '*Morphic-Multilingual') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: Morphic-nice.691.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.691.mcz
==================== Summary ==================== Name: Morphic-nice.691 Author: nice Time: 27 September 2013, 2:05:45.131 am UUID: e25c6256-260f-4f90-9826-bc204f8c6a30 Ancestors: Morphic-nice.690 Give some methods back the the (Multi)CharacterScanner =============== Diff against Morphic-nice.690 =============== Item was removed: - ----- Method: CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - (self perform: stopCondition) - ifTrue: [^ line lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading]] repeat! Item was removed: - ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text Support-scanning') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - firstDestX := destX. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - self perform: stopCondition] whileFalse. - - ^ line - lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category '*Morphic-Multilingual') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: Morphic-nice.691.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.691.mcz
==================== Summary ==================== Name: Morphic-nice.691 Author: nice Time: 27 September 2013, 2:05:45.131 am UUID: e25c6256-260f-4f90-9826-bc204f8c6a30 Ancestors: Morphic-nice.690 Give some methods back the the (Multi)CharacterScanner =============== Diff against Morphic-nice.690 =============== Item was removed: - ----- Method: CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - (self perform: stopCondition) - ifTrue: [^ line lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading]] repeat! Item was removed: - ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text Support-scanning') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - firstDestX := destX. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - self perform: stopCondition] whileFalse. - - ^ line - lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category '*Morphic-Multilingual') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
The Trunk: TrueType-nice.27.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-nice.27.mcz
==================== Summary ==================== Name: TrueType-nice.27 Author: nice Time: 27 September 2013, 2:03:01.235 am UUID: e4a44dc2-20a2-453e-9fca-41c2f8f5f1b5 Ancestors: TrueType-tpr.26 Remove some methods from TrueType now that they don't refer to it. =============== Diff against TrueType-tpr.26 =============== Item was removed: - ----- Method: CharacterScanner>>scanJapaneseCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun! Item was removed: - ----- Method: CharacterScanner>>scanMultiCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun!
1
0
0
0
The Trunk: TrueType-nice.27.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-nice.27.mcz
==================== Summary ==================== Name: TrueType-nice.27 Author: nice Time: 27 September 2013, 2:03:01.235 am UUID: e4a44dc2-20a2-453e-9fca-41c2f8f5f1b5 Ancestors: TrueType-tpr.26 Remove some methods from TrueType now that they don't refer to it. =============== Diff against TrueType-tpr.26 =============== Item was removed: - ----- Method: CharacterScanner>>scanJapaneseCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun! Item was removed: - ----- Method: CharacterScanner>>scanMultiCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun!
1
0
0
0
The Trunk: TrueType-nice.27.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
Nicolas Cellier uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-nice.27.mcz
==================== Summary ==================== Name: TrueType-nice.27 Author: nice Time: 27 September 2013, 2:03:01.235 am UUID: e4a44dc2-20a2-453e-9fca-41c2f8f5f1b5 Ancestors: TrueType-tpr.26 Remove some methods from TrueType now that they don't refer to it. =============== Diff against TrueType-tpr.26 =============== Item was removed: - ----- Method: CharacterScanner>>scanJapaneseCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun! Item was removed: - ----- Method: CharacterScanner>>scanMultiCharactersFrom:to:in:rightX:stopConditions:kern: (in category '*TrueType') ----- - scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta - - | ascii encoding f nextDestX startEncoding | - lastIndex := startIndex. - lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. - startEncoding := (sourceString at: startIndex) leadingChar. - font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. - ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ - f := font fontArray at: startEncoding + 1. - spaceWidth := f widthOf: Space. - ]. - - [lastIndex <= stopIndex] whileTrue: [ - encoding := (sourceString at: lastIndex) leadingChar. - encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. - ascii := (sourceString at: lastIndex) charCode. - (encoding = 0 and: [ascii < 256 and:[(stops at: ascii + 1) notNil]]) - ifTrue: [^ stops at: ascii + 1]. - nextDestX := destX + (font widthOf: (sourceString at: lastIndex)). - nextDestX > rightX ifTrue: [^ stops crossedX]. - destX := nextDestX + kernDelta. - "destX printString displayAt: 0@(lastIndex*20)." - lastIndex := lastIndex + 1. - ]. - lastIndex := stopIndex. - ^ stops endOfRun!
1
0
0
0
The Trunk: Multilingual-tpr.177.mcz
by commits@source.squeak.org
27 Sep '13
27 Sep '13
tim Rowledge uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-tpr.177.mcz
==================== Summary ==================== Name: Multilingual-tpr.177 Author: tpr Time: 26 September 2013, 5:02:39.835 pm UUID: 1a4fc492-87e5-4fa5-a7b4-2d79bd774000 Ancestors: Multilingual-nice.176 Get rid of EncodedCharSet class>>scanSelector MultiCompositionScanner>>isBreakableAt:in:in: & setFont minor changes to some stopcondition methods =============== Diff against Multilingual-nice.176 =============== Item was removed: - ----- Method: EncodedCharSet class>>scanSelector (in category 'accessing - displaying') ----- - scanSelector - "This appears to be redundant - possibly once used as a default and now usurped by LanguageEnvironmet class>scanSelector ?" - ^ #scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:! Item was changed: ----- Method: MultiCharacterScanner>>isBreakableAt:in:in: (in category 'scanner methods') ----- isBreakableAt: index in: sourceString in: encodingClass + "check with the encoding whether the character at index is a breakable character- only the JISX0208 & JapaneseEnvironment will ever return true, so only the scanJapaneseCharacters... method calls this" - ^ encodingClass isBreakableAt: index in: sourceString. ! Item was changed: ----- Method: MultiCharacterScanner>>scanMultiCharactersFrom:to:in:rightX:stopConditions:kern: (in category 'scanning') ----- scanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta | ascii encoding f nextDestX startEncoding floatDestX widthAndKernedWidth nextChar atEndOfRun | lastIndex := startIndex. lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun]. startEncoding := (sourceString at: startIndex) leadingChar. font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1]. ((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [ f := [font fontArray at: startEncoding + 1] ifError: [nil]. f ifNil: [ f := font fontArray at: 1]. spaceWidth := f widthOf: Space. ]. floatDestX := destX. widthAndKernedWidth := Array new: 2. atEndOfRun := false. [lastIndex <= stopIndex] whileTrue: [ encoding := (sourceString at: lastIndex) leadingChar. encoding ~= startEncoding ifTrue: [lastIndex := lastIndex - 1. ^ stops endOfRun]. ascii := (sourceString at: lastIndex) charCode. (ascii < 256 and: [(stops at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1]. nextChar := (lastIndex + 1 <= stopIndex) ifTrue:[sourceString at: lastIndex + 1] ifFalse:[ atEndOfRun := true. "if there is a next char in sourceString, then get the kern and store it in pendingKernX" lastIndex + 1 <= sourceString size ifTrue:[sourceString at: lastIndex + 1] ifFalse:[ nil]]. font widthAndKernedWidthOfLeft: (sourceString at: lastIndex) right: nextChar into: widthAndKernedWidth. nextDestX := floatDestX + (widthAndKernedWidth at: 1). nextDestX > rightX ifTrue: [destX ~= firstDestX ifTrue: [^stops crossedX]]. floatDestX := floatDestX + kernDelta + (widthAndKernedWidth at: 2). atEndOfRun ifTrue:[ pendingKernX := (widthAndKernedWidth at: 2) - (widthAndKernedWidth at: 1). floatDestX := floatDestX - pendingKernX]. destX := floatDestX . lastIndex := lastIndex + 1. ]. lastIndex := stopIndex. ^ stops endOfRun! Item was removed: - ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category 'scanning') ----- - composeFrom: startIndex inRectangle: lineRectangle - firstLine: firstLine leftSide: leftSide rightSide: rightSide - "Answer an instance of TextLineInterval that represents the next line in the paragraph." - | runLength stopCondition | - "Set up margins" - leftMargin := lineRectangle left. - leftSide ifTrue: [leftMargin := leftMargin + - (firstLine ifTrue: [textStyle firstIndent] - ifFalse: [textStyle restIndent])]. - destX := spaceX := leftMargin. - firstDestX := destX. - rightMargin := lineRectangle right. - rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent]. - lastIndex := startIndex. "scanning sets last index" - destY := lineRectangle top. - lineHeight := baseline := 0. "Will be increased by setFont" - self setStopConditions. "also sets font" - runLength := text runLengthFor: startIndex. - runStopIndex := (lastIndex := startIndex) + (runLength - 1). - line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0) - rectangle: lineRectangle. - spaceCount := 0. - self handleIndentation. - leftMargin := destX. - line leftMargin: leftMargin. - - [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex - in: text string rightX: rightMargin stopConditions: stopConditions - kern: kern. - "See setStopConditions for stopping conditions for composing." - self perform: stopCondition] whileFalse. - - ^ line - lineHeight: lineHeight + textStyle leading - baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>composeLine:fromCharacterIndex:inParagraph: (in category 'scanning') ----- composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph "Answer an instance of TextLineInterval that represents the next line in the paragraph." | runLength stopCondition | destX := spaceX := leftMargin := aParagraph leftMarginForCompositionForLine: lineIndex. destY := 0. rightMargin := aParagraph rightMarginForComposition. leftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose']. lastIndex := startIndex. "scanning sets last index" lineHeight := textStyle lineGrid. "may be increased by setFont:..." baseline := textStyle baseline. - baselineY := destY + baseline. self setStopConditions. "also sets font" self handleIndentation. runLength := text runLengthFor: startIndex. runStopIndex := (lastIndex := startIndex) + (runLength - 1). line := TextLineInterval start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0. spaceCount := 0. [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex in: text string rightX: rightMargin stopConditions: stopConditions kern: kern. "See setStopConditions for stopping conditions for composing." self perform: stopCondition] whileFalse. ^line lineHeight: lineHeight + textStyle leading baseline: baseline + textStyle leading! Item was changed: ----- Method: MultiCompositionScanner>>cr (in category 'stop conditions') ----- cr "Answer true. Set up values for the text line interval currently being composed." pendingKernX := 0. + (lastIndex < text size and: [(text at: lastIndex) = Character cr and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. - (lastIndex < text size and: [(text at: lastIndex) = CR and: [(text at: lastIndex+1) = Character lf]]) ifTrue: [lastIndex := lastIndex + 1]. line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - spaceX. ^true! Item was changed: ----- Method: MultiCompositionScanner>>endOfRun (in category 'stop conditions') ----- endOfRun "Answer true if scanning has reached the end of the paragraph. Otherwise step conditions (mostly install potential new font) and answer false." | runLength | lastIndex = text size ifTrue: [line stop: lastIndex. spaceX := destX. line paddingWidth: rightMargin - destX. ^true] ifFalse: [ - "(text at: lastIndex) charCode = 32 ifTrue: [destX := destX + spaceWidth]." runLength := (text runLengthFor: (lastIndex := lastIndex + 1)). runStopIndex := lastIndex + (runLength - 1). self setStopConditions. ^false] ! Item was removed: - ----- Method: MultiCompositionScanner>>isBreakableAt:in:in: (in category 'multilingual scanning') ----- - isBreakableAt: index in: sourceString in: encodingClass - - ^ encodingClass isBreakableAt: index in: sourceString. - ! Item was removed: - ----- Method: MultiCompositionScanner>>setFont (in category 'stop conditions') ----- - setFont - super setFont. - breakAtSpace := false.!
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
43
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Results per page:
10
25
50
100
200