'From etoys2.1 of 8 August 2007 [latest update: #1620] on 11 September 2007 at 9:35:10 pm'! "Change Set: NebraskaFontDecode-yo Date: 11 September 2007 Author: Yoshiki Ohshima Yet another patch to fix the font transmission problem in Nebraska."! !CanvasDecoder class methodsFor: 'decoding' stamp: 'yo 9/11/2007 21:32'! decodeTTCFont: fontString "Decode a string that consists of (e.g. 'ComicSansMS 12 0') into a proper instance." | first second | first _ fontString indexOf: $ startingAt: 1. second _ fontString indexOf: $ startingAt: first + 1. (first ~= 0 and: [second ~= 0]) ifTrue: [ ^ TTCFont familyName: (fontString copyFrom: 1 to: (first - 1)) pointSize: (fontString copyFrom: first + 1 to: second - 1) asNumber emphasis: (fontString copyFrom: second + 1 to: fontString size) asNumber. ]. ^ TextStyle defaultFont. ! !