Closed Bug 297334 Opened 20 years ago Closed 19 years ago

Ctrl+ + changes text coded with absolute font-size

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: x, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When text-size is changed manually from View/Text Size/Increase (Ctrl++),
Firefox changes text coded with an absolute font-size, e.g., "font-size: 12pt".
  A point is 1/72 inch and should always be rendered as such.  At least
according to the W3C CSS2.1 spec.

For an example:
http://www.lm00.com/Larry/VisionCheck.html
The text size inside the Snellen chart should stay consistent, no matter what
the other text zoom is.  This is an xhtml file, but behaves the same with also
the strict and loose definitions.

MSIE handles it properly.  Usually, when I find a discrepency, Firefox is right,
MSIE is wrong.  But I checked the CSS2.1 spec and came to the conclusion that,
in this instance, Firefox is doing the improper rendering.

Larry


Reproducible: Always

Steps to Reproduce:
1. Go to http://www.lm00.com/Larry/VisionCheck.html
2. Scroll down to the Snellen Chart
3. Press Ctrl++


Actual Results:  
Snellen chart characters increase in size.  They shouldn't because they are
coded inside a <div> with "font-size: 90pt".

Expected Results:  
Text outside the Snellen chart should have increased, the text in the chart
should have stayed at the specified point size.  A point is 1/72 inch, an
absolute value.


When viewed in MSIE with zoomed text, the Snellen chart renders appropriately
according to the specified point size.

If a web developer wants text to zoom, they should specify the size in use em's.

Refer to the W3C CSS2.1 spec paragraph 15.1
(http://www.w3.org/TR/CSS21/fonts.html#font-size-props), 
and follow the link to the <length> spec, which is paragraph 4.3.2
(http://www.w3.org/TR/CSS21/syndata.html#value-def-length).
I suggest WONTFIX. See the discussion in bug 113013 (it's about the default
text-size, but text zoom is also mentioned). The user should be in full control
of  what is displayed on his/hers screen, especially if they use text zoom
because it's unreadable (bad eyesight). Ok, the webdesigner should have used
em's, but the text-zoom is used to adapt the fonts sizes to the user.

Note that this will contradict 'page zoom' feature (bug 4821) when it's implemented.
This should be marked duplicate of Bug 4821 and until that feature gets put into
the browser this should be WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
The CSS2.1 spec allows a font-size to be defined by a <length> unit.  It also allows the width property to be defined by the SAME <length> unit.  Firefox does not zoom the width property <length> unit, but it does zoom the font-size <length> unit.  So Firefox treats <length> units differently depending on the property they are used in. Hmmm. 

in, cm, mm, pt and pc are all defined as ABSOLUTE LENGTH units in CSS2.1 paragraph 4.3.2.  In other words, something specified as an inch in length should be rendered an inch in length.  Firefox font-size does not behave that way.

I also have discovered that px's are also handled incorrectly.  If I specify a font-size in px's, the number of pixels I actually get is dependent on the zoom factor.  However, the CSS2.1 spec does say that there should be some modification to the px representation if the display device resolution is much different from that of an average display screen. 

I certainly believe you need to rethink the decision to leave in place the miscoding of Firefox so that miscoded html files will behave properly.  Two wrongs don't make a right.

Please make Firefox conform to the CSS2.1 spec and make an inch equal an inch.
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---
Enlarging (or reducing) text coded with absolute font-size is part of the User Agent Accessibility Guidelines - 
http://www.w3.org/TR/2002/REC-UAAG10-20021217/guidelines.html#tech-configure-text-scale - and therefore is a desirable feature, not a bug.
Marking invalid - see above comments.

Firefox displays pages correctly by default and also allows users to be able to read the text even if a site's webmaster decided to make it font-size: 7px
What's wrong with that? User should be able to do whatever he wants to a web page. See also bug 86194.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → INVALID
One of the problems I have run into is creating a box of a given size using the width property specifying an "in" size, then trying to put a specific number of characters across one row of the box, specifying the character size using "in".

Firefox displays it properly in the default configuration, but if the "text size" is increased, Firefox changes the text size "in", but does not change the width "in", which screws up my formatting.

MSIE handles this appropriately by not changing fonts that are specified in absolute values, which is what the www CSS2 spec calls for.

Opera handles this appropriately by using a "zoom" factor, which zooms the whole page and thus changes both the character size and the width of the box. 

What is bothersome is the fact that Firfox treats "in" specifications differently depending on the context in which they are used.  That is, an "in" is always an inch when used to define a box width, but an "in" is not always an inch when defining a font size. That also applies to "cm" "px" and "pt".
You need to log in before you can comment on or make changes to this bug.