Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.257.mcz ==================== Summary ==================== Name: Graphics-nice.257 Author: nice Time: 9 October 2013, 1:30:52.037 am UUID: 20505844-b570-4fa6-a08e-8140b5cf77e0 Ancestors: Graphics-tpr.256 Give some StrikeFont extensions back to *Multilingual =============== Diff against Graphics-tpr.256 =============== Item was removed: - ----- Method: StrikeFont class>>fixForISO8859From: (in category 'instance creation') ----- - fixForISO8859From: aStrikeFont - - ^aStrikeFont copy fixForISO8859From: aStrikeFont. - ! Item was removed: - ----- Method: StrikeFont class>>newForKoreanFromEFontBDFFile:name:overrideWith: (in category 'instance creation') ----- - newForKoreanFromEFontBDFFile: fileName name: aString overrideWith: otherFileName - - | n | - n := self new. - n readEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName. - ^ n. - ! Item was removed: - ----- Method: StrikeFont class>>newFromEFontBDFFile:name:ranges: (in category 'instance creation') ----- - newFromEFontBDFFile: fileName name: aString ranges: ranges - - | n | - n := self new. - n readEFontBDFFromFile: fileName name: aString ranges: ranges. - ^ n. - ! Item was removed: - ----- Method: StrikeFont class>>newFromEFontBDFFile:name:startRange:endRange: (in category 'instance creation') ----- - newFromEFontBDFFile: aFileName name: aString startRange: start endRange: end - - | n | - n := self new. - n readEFontBDFFromFile: aFileName name: aString rangeFrom: start to: end. - ^n. - - "TextConstants at: #Helvetica put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'})" - "TextConstants at: #Lucida put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'luRS12.bdf' name: 'Lucida'})" - "TextStyle default fontAt: 5 put: (StrikeFont new readFromStrike2: 'helv12.sf2')." - - ! Item was removed: - ----- Method: StrikeFont class>>newFromF12File: (in category 'instance creation') ----- - newFromF12File: aFileName - "StrikeFont newFromF12File: 'kaname.f12'" - - | file n | - ('*.F12' match: aFileName) ifFalse: ["self halt. " "likely incompatible"]. - file := FileStream readOnlyFileNamed: aFileName. - file binary. - n := self new. - n name: (FileDirectory baseNameFor: (FileDirectory localNameFor: aFileName)). - n readF12FromStream: file. - ^ n. - ! Item was removed: - ----- Method: StrikeFont>>fixForISO8859From: (in category 'multibyte character methods') ----- - fixForISO8859From: aStrikeFont - - | fixer m mappingTable | - fixer := StrikeFontFixer newOn: aStrikeFont. - self reset. - xTable := aStrikeFont xTable copy. - glyphs := Form extent: aStrikeFont glyphs extent. - maxAscii := 255. - minAscii := 0. - mappingTable := fixer mappingTable. - "stopConditions := nil." - - 0 to: 255 do: [:i | - (m := mappingTable at: i+1) ~= nil ifTrue: [ - self characterFormAt: (Character value: i) - put: (aStrikeFont characterFormAt: (Character value: m)). - ] ifFalse: [ - self characterFormAt: (Character value: i) - put: (aStrikeFont characterFormAt: (Character space)). - ] - ]. - ^self. - ! Item was removed: - ----- Method: StrikeFont>>readEFontBDFForJapaneseFromFile:name:overrideWith: (in category 'file in/out') ----- - readEFontBDFForJapaneseFromFile: fileName name: aString overrideWith: otherFileName - - | fontReader stream | - fontReader := EFontBDFFontReaderForRanges readOnlyFileNamed: fileName. - stream := ReadStream on: (fontReader readRanges: fontReader rangesForJapanese overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForJapanese). - xTable := stream next. - glyphs := stream next. - minAscii := stream next. - maxAscii := stream next. - maxWidth := stream next. - ascent := stream next. - descent := stream next. - pointSize := stream next. - name := aString. - type := 0. "no one see this" - superscript := ascent - descent // 3. - subscript := descent - ascent // 3. - emphasis := 0. - self reset. - ! Item was removed: - ----- Method: StrikeFont>>readEFontBDFForKoreanFromFile:name:overrideWith: (in category 'file in/out') ----- - readEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName - - | fontReader stream | - fontReader := EFontBDFFontReaderForRanges readOnlyFileNamed: fileName. - stream := ReadStream on: (fontReader readRanges: fontReader rangesForKorean overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForKorean). - xTable := stream next. - glyphs := stream next. - minAscii := stream next. - maxAscii := stream next. - maxWidth := stream next. - ascent := stream next. - descent := stream next. - pointSize := stream next. - name := aString. - type := 0. "no one see this" - superscript := ascent - descent // 3. - subscript := descent - ascent // 3. - emphasis := 0. - self reset. - ! Item was removed: - ----- Method: StrikeFont>>readEFontBDFFromFile:name:rangeFrom:to: (in category 'file in/out') ----- - readEFontBDFFromFile: fileName name: aString rangeFrom: startRange to: endRange - - | fontReader stream | - fontReader := EFontBDFFontReader readOnlyFileNamed: fileName. - stream := ReadStream on: (fontReader readFrom: startRange to: endRange). - xTable := stream next. - glyphs := stream next. - minAscii := stream next. - maxAscii := stream next. - maxWidth := stream next. - ascent := stream next. - descent := stream next. - pointSize := stream next. - name := aString. - type := 0. "no one see this" - superscript := ascent - descent // 3. - subscript := descent - ascent // 3. - emphasis := 0. - self reset. - ! Item was removed: - ----- Method: StrikeFont>>readEFontBDFFromFile:name:ranges: (in category 'file in/out') ----- - readEFontBDFFromFile: fileName name: aString ranges: ranges - - | fontReader stream | - fontReader := EFontBDFFontReaderForRanges readOnlyFileNamed: fileName. - stream := ReadStream on: (fontReader readRanges: ranges). - xTable := stream next. - glyphs := stream next. - minAscii := stream next. - maxAscii := stream next. - maxWidth := stream next. - ascent := stream next. - descent := stream next. - pointSize := stream next. - name := aString. - type := 0. "no one see this" - superscript := ascent - descent // 3. - subscript := descent - ascent // 3. - emphasis := 0. - self reset. - ! Item was removed: - ----- Method: StrikeFont>>readF12FromStream: (in category 'file in/out') ----- - readF12FromStream: aStream - - | box blt | - minAscii := 0. - maxAscii := 94*94. - ascent := 12. - descent := 0. - pointSize := 12. - superscript := 0. - subscript := 0. - emphasis := 0. - maxWidth := 12. - - box := Form extent: 12@12. - glyphs := Form extent: (94*94*12)@12. - blt := BitBlt toForm: glyphs. - xTable := XTableForFixedFont new. - xTable maxAscii: maxAscii + 3. - xTable width: 12. - 1 to: 256 do: [:index | - 1 to: 12 do: [:i | - aStream next. - ]. - ]. - (minAscii + 1 to: 94*94) do: [:index | - self readCharacter: (box bits) from: aStream. - blt copy: ((12*(index-1))@0 extent: 12@12) from: 0@0 in: box. - ]. - ! |
Free forum by Nabble | Edit this page |