Someone knows, why the text on the completion morph is so ugly? For example, this text Morph ne will open a completion window for "Morph class". This name is a vertical label on the left. The text looks ugly when we are using a FT font. Can we do anything to make this look better ? I know that (smooth) text rendering is difficult for arbitrary rotated forms, but this rotation around n*90 degree works with StrikeFont. nicolai
On 10 Dec 2014, at 9:03 , Nicolai Hess <nicolaihess@web.de> wrote:
Someone knows, why the text on the completion morph is so ugly? For example, this text
Morph ne
will open a completion window for "Morph class". This name is a vertical label on the left.
The text looks ugly when we are using a FT font.
Can we do anything to make this look better ?
I know that (smooth) text rendering is difficult for arbitrary rotated forms, but this rotation around n*90 degree works with StrikeFont.
nicolai
I suspect one needs to blend with a transparent white temp canvas, not black, for the TT glyphs to render correctly. In transformBy: aDisplayTransform clippingTo: aClipRect during: aBlock smoothing: cellSize *snip* start to: 2 do: [:i | "If i=1 we first make a shadow and erase it for opaque whites in B&W" subCanvas := self class extent: patchRect extent depth: self depth. i=1 ifTrue: [ warp combinationRule: Form erase ] ifFalse: [ warp combinationRule: rule]. rule = Form blend ifTrue: ["If we want a subcanvas to actually blend nicely, it better be translucent white than translucent black..." ]. Unfortunately, the merging of Color and AlphaColor seems to have broken pretty much every path I could think of to transform translucent black pixels into translucent white pixels (or, maybe doing something like that easily has never worked), and I CBA to fix every method in Color dealing with alpha -> pixel conversion, so this remains a theory. Cheers, Henry
I suspect one needs to blend with a transparent white temp canvas, not black, for the TT glyphs to render correctly. In transformBy: aDisplayTransform clippingTo: aClipRect during: aBlocksmoothing: cellSize
*snip* start to: 2 do: [:i | "If i=1 we first make a shadow and erase it for opaque whites in B&W" subCanvas := self class extent: patchRect extent depth: self depth. i=1ifTrue: [ warp combinationRule: Form erase ] ifFalse: [ warp combinationRule: rule]. *rule = Form blend ifTrue: ["If we want a subcanvas to actually blend nicely, it better be translucent white than translucent black..." * *].*
Unfortunately, the merging of Color and AlphaColor seems to have broken pretty much every path I could think of to transform translucent black pixels into translucent white pixels (or, maybe doing something like that easily has never worked), I do not know. Now we paid attention and we are interested in improvments. and I CBA to fix every method in Color dealing with alpha -> pixel conversion, so this remains a theory. CBA?
Cheers, Henry
2014-12-10 21:03 GMT+01:00 Nicolai Hess <nicolaihess@web.de>:
Someone knows, why the text on the completion morph is so ugly? For example, this text
Morph ne
will open a completion window for "Morph class". This name is a vertical label on the left.
The text looks ugly when we are using a FT font.
Can we do anything to make this look better ?
I know that (smooth) text rendering is difficult for arbitrary rotated forms, but this rotation around n*90 degree works with StrikeFont.
nicolai
Ah, finally -> 15358 <https://pharo.fogbugz.com/default.asp?15358> FreeTypeFont uses the wrong combination rule if subPixelAntiAliasing is disabled TransformationMorph disables subPixelAntiAliasing if the transformation scales and/or rotates. But FreeTypeFont only checks this value to select the glyph, and still uses the subPixelAntialiasing bitblt combination rule for rendering the string.
participants (3)
-
Henrik Johansen -
Nicolai Hess -
stepharo