[Pharo-project] TextEmphasis Questions
1. TextEmphasis class>>narrow ^ TextKern kern: -1 All the other instance creation methods return instances of TextEmphasis, but this one returns aTextKern. Why? I want to implement composable TextEmphases, but this is a thorn in my side. Also, it doesn't smell right because TextEmphases all have an emphasis code, but TextKern doesn't use it. So it can't adeuqately be passed as an argument where aTextEmphasis is expected: e.g. given "MyClass>>#myMethod: aTextEmphasis", "aMyClass myMethod: (TextEmphasis narrow)" will not work as I would expect because the emphasisCode will be 0 (i.e. normal, no special emphasis). 2. TextEmphasis>>writeScanOn: strm emphasisCode = 1 ifTrue: [strm nextPut: $b]. emphasisCode = 2 ifTrue: [strm nextPut: $i]. emphasisCode = 0 ifTrue: [strm nextPut: $n]. emphasisCode = 16 ifTrue: [strm nextPut: $=]. emphasisCode = 4 ifTrue: [strm nextPut: $u]. This seems to be used by RunArray... What if there is a compound emphasis code? e.g. 3 (1 | 2) for bold and italic? Cheers, Sean -- View this message in context: http://forum.world.st/TextEmphasis-Questions-tp4665742.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (1)
-
Sean P. DeNigris