'From etoys3.0 of 24 February 2008 [latest update: #2050] on 9 July 2008 at 1:03:57 pm'! "Change Set: strMorphComposition2-yo Date: 9 July 2008 Author: Yoshiki Ohshima Adds the fall back case when it is run on an older VM."! !StringMorph methodsFor: '*pango' stamp: 'yo 7/9/2008 12:55'! pangoMeasureContents | r myLines tl | r := RomePluginCanvas composingCanvas. myLines := r pangoComposeString: contents attributeArray: self asPangoAttributes at: self position width: SmallInteger maxVal height: SmallInteger maxVal withWrap: false. myLines ifNotNil: [ myLines second size > 0 ifFalse: [^ 0@0]. tl := myLines second first. ^ tl bottomRight - tl topLeft. ]. myLines := Array with: TextLine new. r pangoComposeString: contents attributeArray: self asPangoAttributes at: self position width: SmallInteger maxVal height: SmallInteger maxVal into: myLines withWrap: false. ^ myLines first bottomRight. ! !