Serious crash in BitBlt>installStrikeFont... related methods

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

Serious crash in BitBlt>installStrikeFont... related methods

timrowledge
In BitBlt>computeRGBColorConvertingMap: targetColor to: destDepth keepSubPixelAA: keepSubPix there appears to be a pretty big bug in that the code very explicitly assumes that the 'targetColor' can only be a Color -when in fact InfiniteForms are also quite likely. For example, a StringMorph can have its color as one such. See, for example, Morph>color: where the code explicitly handles an InfiniteForm.

Does anyone here recall developing this code? Any thoughts on what I might do - and yes, I know that not using an  InfiniteForm is one of the things, but right now I still have to discover how it got set that way. Work with me here...

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Multitasking:  Screwing up several things at once...



Reply | Threaded
Open this post in threaded view
|

Re: Serious crash in BitBlt>installStrikeFont... related methods

J. Vuletich (mail lists)
Hi Tim,

Quoting tim Rowledge <[hidden email]>:

> In BitBlt>computeRGBColorConvertingMap: targetColor to: destDepth  
> keepSubPixelAA: keepSubPix there appears to be a pretty big bug in  
> that the code very explicitly assumes that the 'targetColor' can  
> only be a Color -when in fact InfiniteForms are also quite likely.  
> For example, a StringMorph can have its color as one such. See, for  
> example, Morph>color: where the code explicitly handles an  
> InfiniteForm.
>
> Does anyone here recall developing this code? Any thoughts on what I  
> might do - and yes, I know that not using an  InfiniteForm is one of  
> the things, but right now I still have to discover how it got set  
> that way. Work with me here...
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Multitasking:  Screwing up several things at once...
>
>
>
>

I wrote this code. It is the magic to do text with AA, subpixel render  
(or not), in any color, over any color, and over any color depth, with  
good performance. It doesn't handle InfiniteForms. I just tried in  
Squeak 3.7 (that uses the older simple 1bpp fonts), and it is not  
supported there either.

I think it might be possible with an intermediate for for doing rgbmul  
between the font and the infiniteForm. Not trivial, and a lot slower,  
though.

The script I used for testing is:

Display getCanvas drawString: 'contents' in: (10@20 extent: 100@20)  
font: TextStyle defaultFont color: (InfiniteForm with: Color red)

Cheers,
Juan Vuletich