[Gambas-user] Error messages by 0.99
Benoit Minisini
gambas at ...1...
Tue Sep 7 21:43:54 CEST 2004
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...
More information about the User
mailing list