Re: GtkFontSelection




"Damon Chaplin" <DAChaplin@email.msn.com> writes:

> >  - (A problem that is shared with the GIMP and GNOME filesels)
> >    The interface should avoid scaling bitmap fonts unless
> >    the user selects a "scale bitmap fonts" checkbox. Scaled
> >    bitmap fonts are pretty much never desirable.
> 
> I've been trying to figure out how to do this. The problem is
> that X usually comes with two sets of fonts - 75dpi & 100 dpi.
> Yet what if the actual resolution of the user's screen is not
> one of these? (though my system incorrectly reports the size of
> the screen and lo and behold the resolution is exactly 75dpi! -do
> all X servers do that - I doubt it - they shouldn't really.)
> 
> For sizes specified in pixels there's no problem - you can use
> any of the available pixel sizes from 75dpi or 100dpi fonts.
> 
> But for point sizes there is a problem. Do we calculate the
> screen resolution and if it's not exactly 75dpi or 100dpi you don't
> see any fonts? Or do we scale the actual font's point size
> according to the screen resolution (e.g. a 120 decipoint font with
> a reported resolution of 75 dpi would be shown as a 60 decipoint font
> if the screen resolution was actually 150dpi)? But then the
> resulting fontname won't be portable to other machines which have
> a different resolution.

I guess I don't see the problem. The way it is supposed to work is
that the user puts the font sizes they want first in their
fontpath. Then you just put a * in the pixel-size/resolution when
requesting the actual font.

I.e., on my system, the following fonts are listed:

-adobe-helvetica-medium-r-normal--0-0-75-75-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
-adobe-helvetica-medium-r-normal--14-140-75-75-p-77-iso8859-1
-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
-adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1

From that, the font selector figures out that helvetica
is a bitmap font [ the resolution given in the first line
is the clue that it is not a scaled font + tuned bitmaps ]

Then offers the choice of 10, 12, 14, 18, and 24 points.

If I had 100 dpi fonts installed as well, they might look like
 
-adobe-helvetica-medium-r-normal--0-0-100-100-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--14-100-100-100-p-56-iso8859-1
-adobe-helvetica-medium-r-normal--17-120-100-100-p-67-iso8859-1
-adobe-helvetica-medium-r-normal--19-140-100-100-p-77-iso8859-1
-adobe-helvetica-medium-r-normal--25-180-100-100-p-98-iso8859-1
-adobe-helvetica-medium-r-normal--33-240-100-100-p-130-iso8859-1

[ I haven't faked the width column, but that isn't important here ]

It would I think be to clever and incorrect for the font selector to
say.  Well, he really has a 75dpi, screen, so I should ofter the point
sizes:

 10, 12, 14, 17, 18, 19, 24, 25, and 33

Because maybe I have a 100dpi screen and have installed the 100dpi
fonts first in my font path. (The reported resolution is typically
incorrect for PC systems) And these "fake" point sizes probably won't
be available anywhere else.

It would be OK to offer all of the above as pixel sizes.

> Or, as an easier alternative, should I only allow the user to
> specify pixel sizes for bitmap fonts? (if the scaling option is
> turned off). Does anyone have a problem with that? This is my
> preferred option at present.

Always specifying pixel sizes loses the benefit of the user being able
to choose between the two fonts sizes based on their screen
resolution. Point sizes should be the default, and only the ones that
are listed specifically should be offered, IMO.

Regards,
                                        Owen



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