[Gambas-user] Error messages by 0.99

Robert G. Cook, Jr. rgcook at ...595...
Tue Sep 7 23:21:27 CEST 2004


I'm not sure about the rest of you, but I for one am going to read the
change log!

;-)

-----Original Message-----
From: gambas-user-admin at lists.sourceforge.net
[mailto:gambas-user-admin at lists.sourceforge.net] On Behalf Of Benoit
Minisini
Sent: Tuesday, September 07, 2004 2:44 PM
To: gambas-user at lists.sourceforge.net
Subject: Re: [Gambas-user] Error messages by 0.99


On Tuesday 07 September 2004 18:59, ron wrote:
> On Tuesday 07 September 2004 16:03, Eilert wrote:
> > Hi Ron,
> >
> > > The font object is changed between the 0.92 and 0.99
> >
> > It does run better, but I found that all fonts are printed (and 
> > shown on the screen) at least 2 pts too large.
> >
> > Originally I chose 12 pt Courier, and it showed up way too large on 
> > the screen and on the printer. I now have 10, and it comes out at 
> > about 13 pt on my printer in the office and about as 12 on other 
> > printers.
> >
> > Courier is a Type1 font, Courier New a TTF on my system. Both the 
> > same.
> >
> > I even tried with Arial and Times New Roman, the latter is only 
> > slightly too big, but still is. Of course, I compared the values 
> > with other programs on the same machine, i. e. OOo and AbiWord.
> >
> > First thought: printer confusion :-) But remember, the fonts on the 
> > screen are too large as well :-(
> >
> > Is there a way to compensate for those effects?
> >
> > Rolf

People shoud really, really read Changelog! 

REALLY!

Now by default Gambas ignores the DPI of the screen returned by X-Window
when 
deciding the size of the font. Of course this is a bad thing, but this way 
gambas application fonts looks everywhere the same.

For example, when you decide that your Label has a font size of 18, you want

implicitely that on every Linux box, the user gets the same size. Because 
when you draw your interface visually, you think actually "pixels" and not 
"points", that is a resolution-dependent unit.

Note that the value of DPI returned by X is sometimes not accurate, and so, 
sometimes, when you install a Mandrake, you have small fonts or big fonts 
with the same screen, according to your video card!

To change the Gambas behaviour , you have a Font.Resolution property and a 
Desktop.Resolution property. By default, Font.Resolution = 96 whatever 
Desktop.Resolution is.

It is the same thing in Windows - maybe a proof that it is a bad thing :-)

You can change the value of Font.Resolution if you need. If you want the old

Gambas behaviour, try Font.Resolution = Screen.Resolution at the start of 
your program.

As you noticed, Font.Resolution is not used for printing. Happily!
Otherwise, 
a 10 pt font on the screen would become a 10 * 600 / 96 = 62.5 pt font on
the 
printer!

I hope everything is clear now.

P.S. Did I mention that everybody should read the ChangeLog ?

-- 
Benoit Minisini
mailto:gambas at ...1...


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list