Re: seamonkey menu font size

Felix Miata <[email protected]> Tue, 28 Dec 2004 11:58:00 -0500
Newsgroups gmane.comp.mozilla.devel.gtk
Organization less than infinite
Message-ID <[email protected]>
On 04/12/20 10:39 Felix Miata apparently typed:

> On 04/12/19 21:28 Felix Miata apparently typed:

>> At http://24.110.13.74/SS/fonts/mozchrome/chromesizetable.html I 
>> tabulated how we set (chrome) menu fonts in seamonkey for gtk1, gtk2 & 
>> win, and can't figure out why our gtk1 menu font size is 12px 
>> regardless of system or browser DPI when we set gtk2 & win in pt. 
>> NAICT, everything in gtk1 is set in px. Can anyone explain why? It 
>> makes the UI quite hard to see at high resolution, in the absence of 
>> userChrome.css overrides.

> On IRC I got the following response from a knowledgeable developer:

> "In 
> http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsDeviceContextGTK.cpp 
> , we get the fonts in GTK1 by requesting the pixel size from the 
> XFontStruct. That it doesn't change probably means either that the font 
> sizes for the system are stored in pixels or that something is wrong. 
> IIRC, GTK1 allowed users to set their font sizes in either pixels or 
> points -- perhaps you set them in pixels or the defaults are in pixels?"

> After that response, I did a little more testing. I booted SuSE 8.1, ran 
> the same 2004120605 gtk1 build, and got the same results as I did with 
> that build on SuSE 8.2 & RedHat 7.3. Then I booted the same Fedora Core 
> 2 system as before, but ran the 2004120605 gtk1 build. It too produced 
> identical results as running on SuSE 8.1, SuSE 8.2 & RedHat 7.3, 12px 
> regardless of DPI.

> NAICT, in KDE Control Center -> Appearance -> Fonts, the only option for 
> choosing fonts is in points. It seems to me we have a Mozilla gtk1 bug 
> of some sort here. Anyone think differently?

All the following is from Mandrake 8.1, the last Mandrake release to include 
both Netscape 4 and Mozilla.

http://24.110.13.74/SS/fonts/mozchrome/fonts-gnome14-dpi120-12tx.png shows 
that in Gnome 1.4 Control Center "Pick a Font" one can choose with either pt 
or px as a metric, but that:

1-when choosing adobe helvetica 12, only px ever gets selected

2-when choosing bitstream vera sans 12, you get pt when asking for pt, and 
px when asking for px

http://24.110.13.74/SS/fonts/mozchrome/fonts-gnome14-dpi120-14tx.png shows 
the same thing, except choosing size 14 instead of size 12.

So apparently, either xfs or gnome-control-center has a bug not present when 
scalable fonts are selected instead of the common Linux bitmap fonts.

In Gnome 2.6 gnome-control-center I find no opportunity to pick font sizes 
in anything other than pt. When I choose any size 12 font, it is obviously 
12pt and not 12px.

http://24.110.13.74/SS/fonts/mozchrome/fonts-galeon012-1400x1050-dpi120-14pt.png 
shows:

1-Mozilla gtk1 and Galeon 0.12 in pages displayed grant the same meaning to 
CSS2 system fonts, as well as other fonts, rendering all the same as each other.

2-Mozilla chrome and Galeon chrome have different ideas about what size 
system fonts to use. Galeon uses the size chosen for the system, while 
Mozilla is stuck to 12px.

3-Gnome only uses px for bitmap fonts, even though "Pick a Font" purports to 
allow to select in pt.

4-Mozilla's behavior is quite old, here showing in 0.9.4 (2001092020) 
behavior described above for current trunk.


Surely there must be an open Mozilla gtk1 bug on failure to use the system 
font size setting that Galeon apparently has no problem to do, but I can't 
find it.
-- 
"I am the way, and the truth, and the life. No one comes to the
Father except through me."			John 14:6 NIV

  Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://members.ij.net/mrmazda/