Closed Bug 232492 Opened 21 years ago Closed 17 years ago

GUI font size inconsistent with GTK2 user-font setting (font_name, gtk-font-name, gtk-theme-switch)

Categories

(Core :: Widget: Gtk, defect)

1.0 Branch
All
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: 2z9kkv7001, Assigned: blizzard)

References

Details

Attachments

(5 files)

User-Agent: Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 I run Mozilla Firebird and it is compiled with GTK2 support. The GUI correctly uses my GTK2 theme as specified in .gtkrc-2.0, like all my other GTK2 apps. However, it does not heed the font size as specified by the "user-font" setting in .gtkrc-2.0. Here is my .gtkrc-2.0 file: include "/usr/share/themes/Xfce-smooth/gtk-2.0/gtkrc" style "user-font" { font_name="Tahoma 8" } widget_class "*" style "user-font" It seems to use a font size of 10 or 12 rather than 8. My other GTK2 apps properly display a point size of 8, but Firebird doesn't. Or perhaps Firebird is detecting the resolution improperly? My X resolution setting is 100x100 DPI. Anyhow, I've included a screenshot with Firebird beside Gaim, which are both GTK2 apps, so prove my point. Reproducible: Always Steps to Reproduce: 1. Run X at 100 DPI. 2. Set up a GTK2 theme with a scalable font like Tahoma at some point size. 3. Run Firebird. 4. Run another GTK2 app like Gaim. 5. Compare the GUI font size in Firebird to that of Gaim. Actual Results: Firebird's GUI font is larger than that of all other GTK2 apps. However, the font sizes in web pages displayed in Firebird look correct. Expected Results: Firebird's GUI font should be the same size as that of all other GTK2 apps. I'm using Firebird's default theme, and my GTK2 theme is Xfce-smooth (as seen in my .gtkrc-2.0 file in the description). I run Gentoo Linux.
See how the font size of Firebird (left) is at least 3 or 4 points larger than that of Gaim (right). Firebird is the only GTK2 app I have that doesn't heed the font size setting in my .gtkrc-2.0 configuration file.
Blocks: gtk2
Has nobody been able to confirm this yet? It's still a bug with the most recent version of Firefox. My laptop screen is pretty small, so it feels really clunky and wasteful to have the user interface use such a large font. Please let me know if you need more information. I'm very eager to see this bug fixed! :)
I have problems with gtk2 fonts as well, though in my case, firebird seems to ignore the gtk2 font setting entirely: both the size and the actual font family. Instead it uses some sans serif no matter what my gtk2 settings are. This has been true since I started using firefox, with version .4, and now I'm using a recent (a few days ago) CVS build and seeing no change at all. I've also tried deleting my .firefox dir completely, but to no avail. Note that I'm not using any gnome stuff - I'm not sure if that might have something to do with it or not. It shouldn't be necessary, in any case.
This happens for my system as well. Firefox .8. Debian based distro, in all my window managers. Although I don't use gnome so not sure if it would help something there. Basically as others have stated, the theme takes, but the menu fonts are of a different type and size which stands out like a sore thumb. Gtk ver 2.2.4.
WFM Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040613 Firefox/0.8.0+ Maybe try 0.9?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040727 Firefox/0.9.1+ Firefox ignores font family and font size as specified in my .gtkrc-2.0 file which is written with the gtk-theme-switch app. Here's the .gtkrc-2.0 file: [14:10:28][~] $ cat .gtkrc-2.0 # -- THEME AUTO-WRITTEN DO NOT EDIT include "/usr/share/themes/Mist/gtk-2.0/gtkrc" style "user-font" { font_name="Sans 10" } widget_class "*" style "user-font" include "/home/nile/.gtkrc.mine" # -- THEME AUTO-WRITTEN DO NOT EDIT Another details: gtk+-2.4.4 windowmaker 0.80.2 xorg-x11-6.7 DPI Setting in firefox is "System Setting" Also, I believe the following line in my /etc/X11/xorg.conf file affects font sizes in firefox via DPI setting: Option "MonitorLayout" "TMDS" When I change my DPI setting from "System Setting" to "96," fonts get obviously larger.
I'm still seeing this in Firefox 1.0PR and RC1 (Debian and offical builds). No matter what font and font size I use, Firefox doesn't pick it up at all. Also, when I tried to set the UI font to Bitstream Vera Sans 10pt (my normal GTK2 UI font) in userChrome.css, it's smaller than it should be. No matter what font and size I tried in GTK2 and Firefox via userChrome.css, they don't match. I'm not sure but could this be caused by Firefox using the X font server and GTK2 using Pango? Or is Firefox not picking up my resolution correctly, making the sizes not match? Debian Testing/Sarge Linux kernel 2.4 Xfree86 4.3 Display resolution pref in Firefox is set to "system setting"
Moving to core->GFX: Gtk...
Assignee: firefox → blizzard
Component: General → GFX: Gtk
Product: Firefox → Core
QA Contact: ian
Version: unspecified → 1.0 Branch
(In reply to comment #8) > Moving to core->GFX: Gtk... Use: gtk-font-name = "char digit" instead of font_name="char digit" This closes #197491 ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=197491 ) arvind@neregeb:~$ cat .gtkrc-2.0.bak # -- THEME AUTO-WRITTEN DO NOT EDIT include "/usr/share/themes/Default/gtk-2.0/gtkrc" style "user-font" { font_name="Helvetica 9" } widget_class "*" style "user-font" include "/home/arvind/.gtkrc-2.0.mine" # -- THEME AUTO-WRITTEN DO NOT EDIT arvind@neregeb:~$ cat .gtkrc-2.0 gtk-font-name = "Helvetica 9" arvind@neregeb:~$ *.Bak was the previous gtkrc-2.0 ... Arvind Autar(In reply to comment #8) > Moving to core->GFX: Gtk...
Base resolution is probably hardcoded somewhere. Anywhere here are my tests: debian testing with xfree 4.3.x I use firefox under kde. When using gnome the gui font size looks ok (cause of gnome-daemon-settings). I removed gnome entirely and then saw that all my gtk2 gui add a "sans 12" font, looking on google I grabbed some code for my gtkrc-2.0 : style "user-font" { font_name="Verdana 9" } widget_class "*" style "user-font" This works well for all other gtk2 application I have (beep-media-player, eclipse, xchat). But firefox ignore that. I looked at the options and fount the resolution setting set to "system default", changed it to something else, restarted firefox : surprise the GUI font size changed ! Finally a setting of 76dpi works for me and give me the correct size. ldd follow, I am going to attach screenshots. My xdpyinfo : dimensions: 1152x864 pixels (322x241 millimeters) resolution: 91x91 dots per inch $ ldd /usr/lib/mozilla-firefox/firefox-bin libmozjs.so => not found libxpcom.so => not found libplds4.so => /usr/lib/libplds4.so (0x45a10000) libplc4.so => /usr/lib/libplc4.so (0x45a4b000) libnspr4.so => /usr/lib/libnspr4.so (0x45a15000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x46432000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x46330000) libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x48764000) libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x486da000) libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x45b23000) libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x4865f000) libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x4875b000) libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x48a49000) libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x48677000) libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7fb1000) libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7fad000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7f2d000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x46335000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x4630c000) libpng12.so.0 => /usr/lib/libpng12.so.0 (0x4676d000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x47494000) libz.so.1 => /usr/lib/libz.so.1 (0x46444000) libsmime3.so => /usr/lib/libsmime3.so (0xb7f08000) libssl3.so => /usr/lib/libssl3.so (0xb7ee6000) libnss3.so => /usr/lib/libnss3.so (0xb7e78000) libsoftokn3.so => /usr/lib/libsoftokn3.so (0xb7e06000) libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x46458000) libXp.so.6 => /usr/X11R6/lib/libXp.so.6 (0xb7dfe000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x463fe000) libxpcom_compat.so => not found libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x464ba000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x464ad000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x461d5000) libXft.so.2 => /usr/lib/libXft.so.2 (0x48e20000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x46579000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x46628000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x459f7000) libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x48e4a000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x467ac000) libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x48e3f000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x48e35000) libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x486b2000) libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4640e000) libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x46419000) libexpat.so.1 => /usr/lib/libexpat.so.1 (0x465fc000) $
So basicly, I believe the 'Display resolution' setting should apply to HTML view only and not the GUI. Leave that stuff to gtk2rc || gnome || xfree instead.
This bug exists in firefox 1.5 beta1. Firefox is the only gtk2 app that doesn't respect .gtkrc-2.0
*** Bug 222870 has been marked as a duplicate of this bug. ***
tweaking summary, component
Status: UNCONFIRMED → NEW
Component: GFX: Gtk → Widget: Gtk
Ever confirmed: true
Hardware: PC → All
Summary: GUI font size inconsistent with GTK2 user-font setting → GUI font size inconsistent with GTK2 user-font setting (font_name, gtk-font-name, gtk-theme-switch)
WFM with Firefox 1.5rc2 in FC4 control-center-2.10.1-6 (gnome-control-center) gtk+-1.2.10-39 gtk2-2.6.7-4 xorg-x11-6.8.2-31 1152x864 screen resolution 100 DPI set via 'DisplaySize 291 219' in 'Section "Monitor"' in xorg.conf 100 DPI set via gnome-control-center application font Verdana 10 set via gnome-control-center Note 1: test page loaded in Firefox http://members.ij.net/mrmazda/auth/dpi-screen-window.html reports DPI of 103, but that's a Gecko bug summarized at http://members.ij.net/mrmazda/tmp/dpi-broken.html that I've not yet found recorded in the Bugzilla database. Note 2: test system is a KDE primary desktop system on which I added via yum only those GTK & Gnome rpms required to make this screenshot: control-center, plus gaim, plus about 14 deps.
Note that for comment 18 that gnome-control-center wrote the 100 dpi setting to ~/.gconf/desktop/gnome/font_rendering/%gconf.xml (as one of 3 entries in file) and wrote verdana 10 to ~/.gconf/desktop/gnome/interface/%gconf.xml (as only entry in file), not in any ~/.gtkrc* file.
Hi, For me, This bug appeared with Firefox 2.0. No problem with 1.x. xdpyinfo | grep resolution resolution: 65x65 dots per inch with 800x600. The other applications have no font size problems. Fonts are very large (about 16). A home userChrome.css with "font-size: 8pt !important" fixes. Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Works for me, both with gnome installed (setting in preferences/fonts) and without (setting with .gtkrc) Could you verify with a recent trunk (for instance Firefox 3b2) ?
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: