Firefox rounds GNOME default font size down to an integer

Bug #365814 reported by Anders Kaseorg
4
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Low
firefox-3.0 (Ubuntu)
Won't Fix
Low
Unassigned
firefox-3.5 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: firefox-3.0

I set my GNOME default font size to 7.5, but Firefox (3.0 and 3.5 on Jaunty, as well as many previous versions) displays the menu and toolbars at font size 7. Testing with other values indicates that Firefox always rounds fractional UI font sizes down to the next integer.

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

heh

Revision history for this message
In , L. David Baron (dbaron) wrote :

->blizzard

Revision history for this message
In , Felix Miata (mrmazda) wrote :

Only component owners, peers, and drivers may set + flags on blocking. If you
wish blocking considered, set ? on the flag. Unlikely an unconfirmed bug will
block anything though.

Revision history for this message
In , Gervase Markham (gerv-mozilla) wrote :

This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Does this bug still occur in a recent trunk build?
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

Revision history for this message
In , Ross Burton (ross) wrote :

Yes, it does.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Binary package hint: firefox-3.0

I set my GNOME default font size to 7.5, but Firefox (3.0 and 3.5 on Jaunty, as well as many previous versions) displays the menu and toolbars at font size 7. Testing with other values indicates that Firefox always rounds fractional UI font sizes down to the next integer.

Revision history for this message
In , Anders Kaseorg (andersk) wrote :

This still happens in Firefox 3.0 and 3.5 on Jaunty.

Changed in firefox:
status: Unknown → Confirmed
Changed in firefox-3.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Anders Kaseorg (andersk) wrote :

I spotted this mistake, which I bet is responsible for this bug:

--- xulrunner-1.9.0.9.orig/mozilla/gfx/src/thebes/nsSystemFontsGTK2.cpp
+++ xulrunner-1.9.0.9/mozilla/gfx/src/thebes/nsSystemFontsGTK2.cpp
@@ -210,7 +210,7 @@

     aFontStyle->weight = pango_font_description_get_weight(desc);

- float size = float(pango_font_description_get_size(desc) / PANGO_SCALE);
+ float size = float(pango_font_description_get_size(desc)) / PANGO_SCALE;

     // |size| is now either pixels or pango-points (not Mozilla-points!)

Revision history for this message
In , Anders Kaseorg (andersk) wrote :

Created attachment 374580
cast to float before integer division, not after
[Checkin: Comment 14]

Yeah, that does the trick. Tested in xulrunner 1.9.1 and firefox 3.5 on Jaunty. Here’s the same patch as an attachment.

Revision history for this message
In , Blizzard (blizzard) wrote :

Comment on attachment 374580
cast to float before integer division, not after
[Checkin: Comment 14]

Wow, yeah, that's a bug. Good find.

Revision history for this message
In , Blizzard (blizzard) wrote :

Roc - cheap and easy fix for linux. Can you give a quick sr?

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 374580
cast to float before integer division, not after
[Checkin: Comment 14]

sr not needed here

Revision history for this message
In , Blizzard (blizzard) wrote :

I'm old-school. Back where I come from it all needs an sr. :)

Revision history for this message
In , Sgautherie-bz (sgautherie-bz) wrote :

Comment on attachment 374580
cast to float before integer division, not after
[Checkin: Comment 14]

http://hg.mozilla.org/mozilla-central/rev/4561d478f6ba

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Dao (dao) wrote :
Revision history for this message
Micah Gersten (micahg) wrote :

Firefox 3.0 is only receiving Security Updates and major bug fixes at this point.

Changed in firefox-3.0 (Ubuntu):
importance: Undecided → Low
status: Confirmed → Won't Fix
Revision history for this message
Micah Gersten (micahg) wrote :

This was fixed in the initial release version of Firefox 3.5. Please report any other bugs you may find.

Changed in firefox-3.5 (Ubuntu):
importance: Undecided → Low
status: New → Fix Released
Changed in firefox:
importance: Unknown → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.