[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release of GUI Libraries

From: Nicola Pero
Subject: Re: Release of GUI Libraries
Date: Sat, 12 Jan 2002 10:57:06 +0000 (GMT)

> > Anyway I was serious when I was saying that if you scale fonts in points
> > and the rest in pixels, the stuff is unusable.
> > 
> I agree it's a serious problem and I wouldn't release without fixing it. 
> But how should we go about it. Is it fixable or would it require major 
> work?  I have a standard 75dpi screen so I can't even see what the 
> problem is. Perhaps we just need to revert to the previous behavior 
> until we really get graphics working correctly?

I'm not really sure how difficult it would be to draw things in points.  
To me it looks like some sort of major work, but perhaps I'm wrong.

We need to scale all drawing, clipping, etc which might not be terribly

Copy-on-scroll in the gui will need to be changed as well - I
over-commented that part of code so hopefully it should be possible to
figure out how to make it work when the backend is drawing in points.  
But it won't work without changes, and it's delicate code, when it doesn't
work it's very difficult to fix it.  Anyway once the rest is done, I'll
try to manage it.

We would need to scale all images - I'm not sure how difficult/easy that
would be.

I suppose window positions and sizes should be in points as well.

Code to draw in the icon window, which is created by Window Maker of a
fixed size - in pixels - will need to be adjusted so that it draws using
the new API in points but making sure the result fits into a icon window
of a certain fixed size - in pixels.

Last, it is quite possible/nearly certain that after we convert everything
to draw in points, it will not look right, because of the uneven scaling
so some lines might be too big, other too little ... We probably need to
implement some sort of anti-alias drawing of lines etc to work around

To make it all work, quite big improvement of our backend code is needed -
might be an exciting improvement when we get there.

I suppose I would start from the end :-) scaling of images, and anti-alias
of lines and drawing ... (this is probably much more complicated than it
looks) ... doing experiments with windows were the contents are scaled by
weird factors such as 1.3333 or 0.963724 ... once the system can scale at
all factors and the result is visually good (I think you need quite a
refined drawing system for that to work), then you can move the whole
system to scale everything automatically to match the point size of the
screen.  It will be great if we can have it, but it doesn't look like
terribly easy.

As a quick fix, I think you can revert the code to use pixel sizes for
fonts ... making sure we put appropriate 'FIXME' there saying that we
should really be using point sizes for fonts (and what the right code is)
but we don't do it yet because all the rest is drawn in pixels, so it
would make the library unusable.

Or perhaps, use a user defaults to switch between pixels and points for
font sizes, but make it use pixels by default for now.  We'll switch it to
points when all the system is using points (we'll probably completely
remove the option to use pixels at that point).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]