[squeak-dev] [ANN][Squeak-dev Images] September 2008 versions

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

Problems with NiceFonts and composite window managers Re: [squeak-dev] Re: [ANN][Squeak-dev Images] September 2008 versions

Juan Vuletich-4
Hi folks,

Unfortunately, the problem is not in the fonts code. There is a bug in
Bitblt, rule 28. Rule 28 is supposed to take the minimum value between
source and destination. I use it to render 32 bit per pixel fonts.
Unfortunately there is a bug in BitBlt. The result values for r, g and b
are computed correctly. But the alpha channel is always set at zero
(i.e. transparent). Usually the VM / OS ignores the alpha channel of the
display. But with composite window managers on Linux, it is honored, and
the bug is exposed.

You can try for yourself. Evaluate:

(Display pixelValueAt: 10@10)printStringBase: 16

You'll get something like this '16rFF455286'. The FF at the first byte
is alpha. FF means opaque. Now, run the following code, and with the
mouse go and paint the top left area of your display. Then do click. Do
not clean the garbage on the screen yet.

    f := Form extent: 20 @ 20 depth: 32.
    f fillWithColor: Color red.
    aBitBlt := BitBlt
        destForm: Display
        sourceForm: f
        fillColor: nil
        combinationRule: 28
        destOrigin: Sensor cursorPoint
        sourceOrigin: 0 @ 0
        extent: f extent
        clipRect: Display computeBoundingBox.
    [Sensor anyButtonPressed] whileFalse:
        [aBitBlt destOrigin: Sensor cursorPoint - (10@10).
        aBitBlt copyBits].

Now check (f pixelValueAt: 10@10) printStringBase: 16. You'll see that
inside form f, the alpha is FF, i.e. opaque again.

Now print (Display pixelValueAt: 10@10) printStringBase: 16. I get
'16r450000'. Adding the missing leading zeros, it is '16r00450000'. You
can see that Bitblt correctly left the red unchanged and made zero green
and blue. Unfortunately, alpha went to zero.

I believe this is a bug. Rule 28 means "take the minimum between source
and destination". It could do the same for alpha, or it could leave
alpha unchanged. Both would be acceptable behaviors. But setting alpha
to zero for no good reason is a bug.

Perhaps there is some bitblt rule that can be used for setting alpha to
255 after rendering text. If someone knows how to do it, it could be a
good workaround.

Another workaround is to do
    Prederences setPreferencesFrom: #((subPixelRenderFonts false))
This will turn off subpixel rendering, using only gray levels for AA.
This uses BitBlt rule 34, that does not have this problem.

Cheers,
Juan Vuletich

Mariano Martinez Peck wrote:

>
>
>     WRT composite window managers on Linux, it seems I need to make
>     sure the alpha channel is set to 1.0. I'll do it. I'll need help
>     with testing it, though.
>
>
> Just let me know when and how and I will test it as soon as I have
> time. I was one of those who has that problem.
>
> cheers,
>
> mariano
>
> pd: juan: si me pedis algo, pedimelo en castellano jajaj ;)
>
> ------------------------------------------------------------------------
>
>
>  
> ------------------------------------------------------------------------
>
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.6.6 - Release Date: 8/19/2008 12:00 AM
>  


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Problems with NiceFonts and composite window managers

Bert Freudenberg
Am 11.09.2008 um 15:39 schrieb Juan Vuletich:

> Usually the VM / OS ignores the alpha channel of the display. But  
> with composite window managers on Linux, it is honored, and the bug  
> is exposed.


This is a VM problem and has a fix, as already discussed previously:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Juan Vuletich-4
Bert Freudenberg wrote:

> Am 11.09.2008 um 15:39 schrieb Juan Vuletich:
>
>> Usually the VM / OS ignores the alpha channel of the display. But
>> with composite window managers on Linux, it is honored, and the bug
>> is exposed.
>
>
> This is a VM problem and has a fix, as already discussed previously:
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html 
>
>
> - Bert -
>
>
>
>
>

Thanks Bert. I wonder what would need to happen for this fix to be
included in the compiled VM's most people use.

Cheers,
Juan Vuletich

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Mariano Martinez Peck
Bert: I have done exactly what you said in other mail:

$ svn co http://squeakvm.org/svn/squeak/branches/olpc squeak-vm
$ cd squeak-vm/platforms/unix
$ make
$ sudo make install

... which installs in /usr/local


And works perfect!!!

However, I have a question. In the link I see this VM is under "olpc". Is this correct?

many thanks,

mariano

On Thu, Sep 11, 2008 at 11:02 AM, Juan Vuletich <[hidden email]> wrote:
Bert Freudenberg wrote:
Am 11.09.2008 um 15:39 schrieb Juan Vuletich:

Usually the VM / OS ignores the alpha channel of the display. But with composite window managers on Linux, it is honored, and the bug is exposed.


This is a VM problem and has a fix, as already discussed previously:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html

- Bert -






Thanks Bert. I wonder what would need to happen for this fix to be included in the compiled VM's most people use.

Cheers,
Juan Vuletich




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Mariano Martinez Peck
I have installed Nice Fonts in this new vm and works perfetly. Now I have a question....It put me nice fonts but fonts seems to be too big for me (code fonts, menu fonts...all of them). How can I change this? how can I know which fonts I have currently set for each type (code, menu and so on) ?

many thanks,

mariano

On Thu, Sep 11, 2008 at 11:38 PM, Mariano Martinez Peck <[hidden email]> wrote:
Bert: I have done exactly what you said in other mail:

$ svn co http://squeakvm.org/svn/squeak/branches/olpc squeak-vm
$ cd squeak-vm/platforms/unix
$ make
$ sudo make install

... which installs in /usr/local


And works perfect!!!

However, I have a question. In the link I see this VM is under "olpc". Is this correct?

many thanks,

mariano


On Thu, Sep 11, 2008 at 11:02 AM, Juan Vuletich <[hidden email]> wrote:
Bert Freudenberg wrote:
Am 11.09.2008 um 15:39 schrieb Juan Vuletich:

Usually the VM / OS ignores the alpha channel of the display. But with composite window managers on Linux, it is honored, and the bug is exposed.


This is a VM problem and has a fix, as already discussed previously:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html

- Bert -






Thanks Bert. I wonder what would need to happen for this fix to be included in the compiled VM's most people use.

Cheers,
Juan Vuletich





Reply | Threaded
Open this post in threaded view
|

Re: Problems with NiceFonts and composite window managers Re: [squeak-dev] Re: [ANN][Squeak-dev Images] September 2008 versions

Damien Cassou-3
In reply to this post by Juan Vuletich-4
On Thu, Sep 11, 2008 at 3:39 PM, Juan Vuletich <[hidden email]> wrote:
> Another workaround is to do
>   Prederences setPreferencesFrom: #((subPixelRenderFonts false))
> This will turn off subpixel rendering, using only gray levels for AA. This
> uses BitBlt rule 34, that does not have this problem.

Thanks for the report. Do you recommend me to do that on all dev
images? What are the cons?

--
Damien Cassou
Peter von der Ahé: «I'm beginning to see why Gilad wished us good
luck». (http://blogs.sun.com/ahe/entry/override_snafu)


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Juan Vuletich-4
In reply to this post by Mariano Martinez Peck
Mariano Martinez Peck wrote:
> I have installed Nice Fonts in this new vm and works perfetly. Now I
> have a question....It put me nice fonts but fonts seems to be too big
> for me (code fonts, menu fonts...all of them). How can I change this?
> how can I know which fonts I have currently set for each type (code,
> menu and so on) ?
>
> many thanks,
>
> mariano
World Menu / Appearance / system fonts

Cheers,
Juan Vuletich

Reply | Threaded
Open this post in threaded view
|

Re: Problems with NiceFonts and composite window managers Re: [squeak-dev] Re: [ANN][Squeak-dev Images] September 2008 versions

Juan Vuletich-4
In reply to this post by Damien Cassou-3
Damien Cassou wrote:

> On Thu, Sep 11, 2008 at 3:39 PM, Juan Vuletich <[hidden email]> wrote:
>  
>> Another workaround is to do
>>   Prederences setPreferencesFrom: #((subPixelRenderFonts false))
>> This will turn off subpixel rendering, using only gray levels for AA. This
>> uses BitBlt rule 34, that does not have this problem.
>>    
>
> Thanks for the report. Do you recommend me to do that on all dev
> images? What are the cons?
>
>  
The cons is that it won't use subpixel rendering anymore. Only gray
level. To my eyes, subpixel rendering is mandatory. Without it, fonts
look horrible to me. But it is a personal preference. I'd leave it on.
Others might disagree.

BTW, where I wrote "Prederences" it should read "Preferences"!

Cheers,
Juan Vuletich

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Bert Freudenberg
In reply to this post by Mariano Martinez Peck

Am 12.09.2008 um 04:38 schrieb Mariano Martinez Peck:

> Bert: I have done exactly what you said in other mail:
>
> $ svn co http://squeakvm.org/svn/squeak/branches/olpc squeak-vm
> $ cd squeak-vm/platforms/unix
> $ make
> $ sudo make install
>
> ... which installs in /usr/local
>
>
> And works perfect!!!
>
> However, I have a question. In the link I see this VM is under  
> "olpc". Is this correct?

Yes. The OLPC "XO" laptop is a regular Linux machine so that VM works  
fine on any Linux. There is only one OLPC-specific change in there,  
the rest is bug fixes and improvements. All of this will be merged  
back to the main VM when time permits.

- Bert -


>
> many thanks,
>
> mariano
>
> On Thu, Sep 11, 2008 at 11:02 AM, Juan Vuletich <[hidden email]>  
> wrote:
> Bert Freudenberg wrote:
> Am 11.09.2008 um 15:39 schrieb Juan Vuletich:
>
> Usually the VM / OS ignores the alpha channel of the display. But  
> with composite window managers on Linux, it is honored, and the bug  
> is exposed.
>
>
> This is a VM problem and has a fix, as already discussed previously:
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html
>
> - Bert -
>
>
>
>
>
>
> Thanks Bert. I wonder what would need to happen for this fix to be  
> included in the compiled VM's most people use.
>
> Cheers,
> Juan Vuletich
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problems with NiceFonts and composite window managers

Mariano Martinez Peck
I have another question. Now, I realized that with this vm I compile by myself, It doesn't work the "^". I mean, I press AltGr + ^ (the same key where de "[" and the "{" is )  and I get a "?".

However, if I use the vm I install trough apt-get it works ok.

I am using Ubuntu 8.04, my keyboard is Latin American.

Can this be something related with UTF-8 ???

how can I fix this in the vm I compile ?

many thanks,

mariano

On Fri, Sep 12, 2008 at 4:47 AM, Bert Freudenberg <[hidden email]> wrote:

Am 12.09.2008 um 04:38 schrieb Mariano Martinez Peck:


Bert: I have done exactly what you said in other mail:

$ svn co http://squeakvm.org/svn/squeak/branches/olpc squeak-vm
$ cd squeak-vm/platforms/unix
$ make
$ sudo make install

... which installs in /usr/local


And works perfect!!!

However, I have a question. In the link I see this VM is under "olpc". Is this correct?

Yes. The OLPC "XO" laptop is a regular Linux machine so that VM works fine on any Linux. There is only one OLPC-specific change in there, the rest is bug fixes and improvements. All of this will be merged back to the main VM when time permits.

- Bert -




many thanks,

mariano

On Thu, Sep 11, 2008 at 11:02 AM, Juan Vuletich <[hidden email]> wrote:
Bert Freudenberg wrote:
Am 11.09.2008 um 15:39 schrieb Juan Vuletich:

Usually the VM / OS ignores the alpha channel of the display. But with composite window managers on Linux, it is honored, and the bug is exposed.


This is a VM problem and has a fix, as already discussed previously:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-August/130935.html

- Bert -






Thanks Bert. I wonder what would need to happen for this fix to be included in the compiled VM's most people use.

Cheers,
Juan Vuletich








12