The Trunk: Graphics-nice.233.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-nice.233.mcz

commits-2
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.233.mcz

==================== Summary ====================

Name: Graphics-nice.233
Author: nice
Time: 27 September 2013, 1:53:01.807 am
UUID: aeee4a41-9891-4ab3-9f0e-723f8dbb0a9b
Ancestors: Graphics-nice.232

We've taken back from TrueType, now don't refer to TrueType, just use isFontSet.

=============== Diff against Graphics-nice.232 ===============

Item was changed:
  ----- Method: CharacterScanner>>scanJapaneseCharactersFrom:to:in:rightX:stopConditions:kern: (in category 'scanner methods') -----
  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 isFontSet ifTrue: [
- ((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 changed:
  ----- Method: CharacterScanner>>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 |
  lastIndex := startIndex.
  lastIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun].
  startEncoding := (sourceString at: startIndex) leadingChar.
  font ifNil: [font := (TextConstants at: #DefaultMultiStyle) fontArray at: 1].
+ font isFontSet ifTrue: [
- ((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!