[Pkg] The Trunk: TrueType-mt.44.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 16 16:17:37 UTC 2016


Marcel Taeumel uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-mt.44.mcz

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

Name: TrueType-mt.44
Author: mt
Time: 16 August 2016, 6:17:31.762602 pm
UUID: b68152cf-22e5-bc4f-94f2-65c0c6769f62
Ancestors: TrueType-mt.43

Removes additional dependency TrueType -> Morphic.

(Note that we will move the Canvas abstraction into Graphics in the future so that #getCanvas will also work without Morphic even though it does not at the moment as you can see in DisplayScreen >> #defaultCanvasClass).

=============== Diff against TrueType-mt.43 ===============

Item was changed:
  ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor:lineGlyph:lingGlyphWidth:emphasis: (in category 'converting') -----
  asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag lineGlyph: lineGlyph lingGlyphWidth: lWidth emphasis: code
  
  	| form canvas newScale |
  	form := Form extent: (advanceWidth @ (ascender - descender) * scale) rounded depth: depth.
  	form fillColor: bgColor.
+ 	canvas := form getCanvas asBalloonCanvas.
- 	canvas := BalloonCanvas on: form.
  	canvas aaLevel: 4.
  	canvas transformBy: (MatrixTransform2x3 withScale: scale asPoint * (1 @ -1)).
  	canvas transformBy: (MatrixTransform2x3 withOffset: 0 @ ascender negated).
  	canvas
  		drawGeneralBezierShape: self contours
  		color: fgColor 
  		borderWidth: 0 
  		borderColor: fgColor.
  	((code bitAnd: 4) ~= 0 or: [(code bitAnd: 16) ~= 0]) ifTrue: [
  		newScale := (form width + 1) asFloat / lineGlyph calculateWidth asFloat.
  		canvas transformBy: (MatrixTransform2x3 withScale: (newScale / scale)@1.0).
  
  		(code bitAnd: 4) ~= 0 ifTrue: [
  			canvas
  				drawGeneralBezierShape: lineGlyph contours
  				color: fgColor 
  				borderWidth: 0 
  				borderColor: fgColor.
  		].
  
  		(code bitAnd: 16) ~= 0 ifTrue: [
  			canvas transformBy: (MatrixTransform2x3 withOffset: 0@(ascender // 2)).
  			canvas
  				drawGeneralBezierShape: lineGlyph contours
  				color: fgColor 
  				borderWidth: 0 
  				borderColor: fgColor.
  		].
  	].
  
  	replaceColorFlag ifTrue: [
  		form replaceColor: bgColor withColor: Color transparent.
  	].
  	^ form!



More information about the Packages mailing list