'From Cuis 1.0 of 21 August 2009 [latest update: #268] on 23 August 2009 at 11:38:56 pm'!

!Color methodsFor: 'transformations' stamp: 'jmv 8/23/2009 23:24'!
veryMuchDarker

	^ self alphaMixed: 0.25 with: Color black
! !


!SHTextStylerST80 class methodsFor: 'style table' stamp: 'jmv 8/23/2009 23:37'!
defaultStyleTable
	"color can be a valid argument to Color class>>colorFrom: , or nil to
	use the editor text color.
	Multiple emphases can be specified using an array e.g. #(bold italic).
	If emphasis is not specified, #normal will be used.
	Tweaked by jmv
	"
								
^#(
	"(symbol									color							[emphasisSymbolOrArray])"		
	(default 									black 		)
	(invalid 									red 			)
	(excessCode 								red 			)
	(comment 								(green muchDarker) 		italic)
	(unfinishedComment 					(red muchDarker) 			italic)
	(#'$'										(red muchDarker) 	)
	(character								(red muchDarker) 	)
	(integer									(red muchDarker) 	)
	(number									(red muchDarker) 	)	
	(#-											(red muchDarker) 	)
	(symbol									(blue muchDarker)			bold)	
	(stringSymbol							(blue muchDarker)			bold)	
	(literalArray								(blue muchDarker)			bold)
	(string										(magenta muchDarker)		normal)
	(unfinishedString						red							normal		)
	(assignment								nil								bold			)
	(ansiAssignment 						nil								bold)
	(literal										nil								italic)
	(keyword									(blue muchDarker)			)
	(binary 									(blue muchDarker)			)	
	(unary										(blue muchDarker)			)
	(incompleteKeyword					(gray veryMuchDarker)		underlined)
	(incompleteBinary 						(gray veryMuchDarker)		underlined)	
	(incompleteUnary						(gray veryMuchDarker)		underlined)
	(undefinedKeyword						red			)
	(undefinedBinary 						red			)	
	(undefinedUnary							red			)													
	(patternKeyword 						nil								bold)
	(patternBinary 							nil								bold)
	(patternUnary							nil								bold)	
	(#self 										(red muchDarker)			bold)
	(#super									(red muchDarker)			bold) 
	(#true 									(red muchDarker)			bold)
	(#false 									(red muchDarker)			bold)
	(#nil 										(red muchDarker)			bold)
	(#thisContext 							(red muchDarker)			bold)
	(#return									(red muchDarker)			bold)
	(patternArg 								(blue muchDarker)			italic)	
	(methodArg 								(blue muchDarker)			italic)
	(blockPatternArg 						(blue muchDarker)			italic)
	(blockArg 									(blue muchDarker)			italic)
	(argument 								(blue muchDarker)			italic)
	(blockArgColon							black		) 
	(leftParenthesis							black		) 
	(rightParenthesis						black		) 
	(leftParenthesis1						(green muchDarker)		) 
	(rightParenthesis1						(green muchDarker)		) 
	(leftParenthesis2						(magenta muchDarker)		) 
	(rightParenthesis2						(magenta muchDarker)		) 
	(leftParenthesis3						(red muchDarker)		) 
	(rightParenthesis3						(red muchDarker)		) 
	(leftParenthesis4						(green darker)		) 
	(rightParenthesis4						(green darker)		) 
	(leftParenthesis5						(orange darker)		) 
	(rightParenthesis5						(orange darker)		) 
	(leftParenthesis6						(magenta darker)		) 
	(rightParenthesis6						(magenta darker)		) 
	(leftParenthesis7						blue		) 
	(rightParenthesis7						blue		) 
	(blockStart 								black		) 
	(blockEnd 								black		) 
	(blockStart1								(green muchDarker)			) 
	(blockEnd1								(green muchDarker)			) 
	(blockStart2								(magenta muchDarker)		) 
	(blockEnd2								(magenta muchDarker)		) 
	(blockStart3								(red muchDarker)		) 
	(blockEnd3								(red muchDarker)		) 
	(blockStart4								(green darker)		) 
	(blockEnd4								(green darker)		) 
	(blockStart5								(orange darker)		) 
	(blockEnd5								(orange darker)		) 
	(blockStart6								(magenta darker)		) 
	(blockEnd6								(magenta darker)		) 
	(blockStart7								blue		) 
	(blockEnd7								blue		) 																																																		
	(arrayStart								black		) 
	(arrayEnd									black		) 
	(arrayStart1								black		) 
	(arrayEnd1								black		) 
	(leftBrace 								black		) 
	(rightBrace 								black		) 
	(cascadeSeparator 						black		) 
	(statementSeparator 					black		) 
	(externalCallType 						black		) 
	(externalCallTypePointerIndicator 	black		) 
	(primitiveOrExternalCallStart 			black							bold	) 
	(primitiveOrExternalCallEnd			black							bold	)
	(methodTempBar						gray		) 
	(blockTempBar 							gray		)
	(blockArgsBar							gray		)
	(primitive									(green muchDarker)			bold)
	(pragmaKeyword						(green muchDarker)			bold)
	(pragmaUnary							(green muchDarker)			bold)
	(pragmaBinary							(green muchDarker)			bold)									
	(externalFunctionCallingConvention	(green muchDarker)			bold) 
	(module									(green muchDarker)			bold)
	(blockTempVar 							gray							italic)
	(blockPatternTempVar					gray							italic)
	(instVar 									(magenta muchDarker)		)
	(workspaceVar							black							bold)
	(undefinedIdentifier					red							bold)
	(incompleteIdentifier					(gray muchDarker) 			(italic underlined))
	(tempVar									(gray muchDarker)			italic)
	(patternTempVar						(gray muchDarker)			italic)
	(poolConstant							(gray muchDarker)			italic)
	(classVar									(gray muchDarker)			bold)
	(globalVar								black							bold) )
							! !

!SHTextStylerST80 class methodsFor: 'style table' stamp: 'jmv 8/23/2009 23:30'!
originalStyleTable
	"color can be a valid argument to Color class>>colorFrom: , or nil to
	use the editor text color.
	Multiple emphases can be specified using an array e.g. #(bold italic).
	If emphasis is not specified, #normal will be used.
	Original definition by Andy Tween
	"
								
^#(
	"(symbol									color							[emphasisSymbolOrArray])"		
	(default 									black 		)
	(invalid 									red 			)
	(excessCode 								red 			)
	(comment 								(green muchDarker) 		italic)
	(unfinishedComment 					(red muchDarker) 			italic)
	(#'$'										(red muchDarker) 	)
	(character								(red muchDarker) 	)
	(integer									(red muchDarker) 	)
	(number									(red muchDarker) 	)	
	(#-											(red muchDarker) 	)
	(symbol									(blue muchDarker)			bold)	
	(stringSymbol							(blue muchDarker)			bold)	
	(literalArray								(blue muchDarker)			bold)
	(string										(magenta muchDarker)		normal)
	(unfinishedString						red							normal		)
	(assignment								nil								bold			)
	(ansiAssignment 						nil								bold)
	(literal										nil								italic)
	(keyword									(blue muchDarker)			)
	(binary 									(blue muchDarker)			)	
	(unary										(blue muchDarker)			)
	(incompleteKeyword					(gray muchDarker)			underlined)
	(incompleteBinary 						(gray muchDarker)			underlined)	
	(incompleteUnary						(gray muchDarker)			underlined)
	(undefinedKeyword						red			)
	(undefinedBinary 						red			)	
	(undefinedUnary							red			)													
	(patternKeyword 						nil								bold)
	(patternBinary 							nil								bold)
	(patternUnary							nil								bold)	
	(#self 										(red muchDarker)			bold)
	(#super									(red muchDarker)			bold) 
	(#true 									(red muchDarker)			bold)
	(#false 									(red muchDarker)			bold)
	(#nil 										(red muchDarker)			bold)
	(#thisContext 							(red muchDarker)			bold)
	(#return									(red muchDarker)			bold)
	(patternArg 								(blue muchDarker)			italic)	
	(methodArg 								(blue muchDarker)			italic)
	(blockPatternArg 						(blue muchDarker)			italic)
	(blockArg 									(blue muchDarker)			italic)
	(argument 								(blue muchDarker)			italic)
	(blockArgColon							black		) 
	(leftParenthesis							black		) 
	(rightParenthesis						black		) 
	(leftParenthesis1						(green muchDarker)		) 
	(rightParenthesis1						(green muchDarker)		) 
	(leftParenthesis2						(magenta muchDarker)		) 
	(rightParenthesis2						(magenta muchDarker)		) 
	(leftParenthesis3						(red muchDarker)		) 
	(rightParenthesis3						(red muchDarker)		) 
	(leftParenthesis4						(green darker)		) 
	(rightParenthesis4						(green darker)		) 
	(leftParenthesis5						(orange darker)		) 
	(rightParenthesis5						(orange darker)		) 
	(leftParenthesis6						(magenta darker)		) 
	(rightParenthesis6						(magenta darker)		) 
	(leftParenthesis7						blue		) 
	(rightParenthesis7						blue		) 
	(blockStart 								black		) 
	(blockEnd 								black		) 
	(blockStart1								(green muchDarker)			) 
	(blockEnd1								(green muchDarker)			) 
	(blockStart2								(magenta muchDarker)		) 
	(blockEnd2								(magenta muchDarker)		) 
	(blockStart3								(red muchDarker)		) 
	(blockEnd3								(red muchDarker)		) 
	(blockStart4								(green darker)		) 
	(blockEnd4								(green darker)		) 
	(blockStart5								(orange darker)		) 
	(blockEnd5								(orange darker)		) 
	(blockStart6								(magenta darker)		) 
	(blockEnd6								(magenta darker)		) 
	(blockStart7								blue		) 
	(blockEnd7								blue		) 																																																		
	(arrayStart								black		) 
	(arrayEnd									black		) 
	(arrayStart1								black		) 
	(arrayEnd1								black		) 
	(leftBrace 								black		) 
	(rightBrace 								black		) 
	(cascadeSeparator 						black		) 
	(statementSeparator 					black		) 
	(externalCallType 						black		) 
	(externalCallTypePointerIndicator 	black		) 
	(primitiveOrExternalCallStart 			black							bold	) 
	(primitiveOrExternalCallEnd			black							bold	)
	(methodTempBar						gray		) 
	(blockTempBar 							gray		)
	(blockArgsBar							gray		)
	(primitive									(green muchDarker)			bold)
	(pragmaKeyword						(green muchDarker)			bold)
	(pragmaUnary							(green muchDarker)			bold)
	(pragmaBinary							(green muchDarker)			bold)									
	(externalFunctionCallingConvention	(green muchDarker)			bold) 
	(module									(green muchDarker)			bold)
	(blockTempVar 							gray							italic)
	(blockPatternTempVar					gray							italic)
	(instVar 									black							bold)
	(workspaceVar							black							bold)
	(undefinedIdentifier					red							bold)
	(incompleteIdentifier					(gray darker) 					(italic underlined))
	(tempVar									(gray darker)					italic)
	(patternTempVar						(gray darker)					italic)
	(poolConstant							(gray darker)					italic)
	(classVar									(gray darker)					bold)
	(globalVar								black							bold) )! !


!StrikeFont methodsFor: 'accessing' stamp: 'jmv 8/23/2009 23:21'!
baseKern
	"Return the base kern value to be used for all characters.
	What follows is some 'random' text used to visually adjust this method.
	HaHbHcHdHeHfHgHhHiHjHkHlHmHnHoHpHqHrHsHtHuHvHwHxHyHzH
	HAHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRHSHTHUHVHWHXHYHXZH
	wok yuyo	wuwu	vuvu	rucu	tucu	WUWU	VUVU	huevo	HUEVO	to
											k y mate	runico ridiculo	ARABICO	AAAAA	TOMATE
	TUTU
	tatadalajafua
	abacadafagahaqawaearatayauaiaoapasadafagahajakalazaxacavabanama
	kUxUxa
	q?d?h?l?t?f?j?"
	
	| italic baseKern |
	italic _ emphasis allMask: 2.
	
	"Assume synthetic will not affect kerning (i.e. synthetic italics are not used)"
" 	self isSynthetic ifFalse: ["
		baseKern _ (italic or: [ pointSize < 9 ])
			ifTrue: [ 1 ]
			ifFalse: [ 0 ].
		(italic not and: [pointSize = 12]) ifTrue: [
			baseKern _ baseKern -1 ].
		pointSize >= 13 ifTrue: [
			baseKern _ baseKern -1 ].
		pointSize >= 20 ifTrue: [
			baseKern _ baseKern -1 ].
		^baseKern
"		]".
		
"	italic ifFalse: [^ 0].
	^ ((self height-1-self ascent+4)//4 max: 0)  
		+ (((self ascent-5+4)//4 max: 0))" 
	"See makeItalicGlyphs"! !

SHTextStylerST80 class removeSelector: #subduedStyleTable!
"Postscript:
Leave the line above, and replace the rest of this comment by a useful one.
Executable statements should follow this comment, and should
be separated by periods, with no exclamation points (!!).
Be sure to put any further comments in double-quotes, like this one."
		SHTextStylerST80 initialize!

