"font-family: -moz-fixed, monospace;" rendered wrong

VERIFIED WONTFIX

Status

()

VERIFIED WONTFIX
18 years ago
16 years ago

People

(Reporter: bzbarsky, Assigned: pierre)

Tracking

({css-moz})

Trunk
css-moz
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: WONTFIX?)

(Reporter)

Description

18 years ago
BUILD: Linux build 2001-05-02-06

See the discussion in bug 78441 and bug 76531.  If one uses "font-family:
-moz-fixed, monospace;" the -moz-fixed is ignored.  I realize -moz-fixed is
"special", but this is a very odd behavior.

Comment 1

18 years ago
Changing from PC/Linux to All/All. I have noted this problem on Win2K too.
OS: Linux → All
Hardware: PC → All

Comment 2

18 years ago
The problem with this bug is that the special handling of -moz-fixed in the 
Style System is based on the _equality_ of the font-family with -moz-fixed. 
i.e., -moz-fixed should always be the only font...

I am facing the same problem over at bug 84398. I am going to adopt the same
semantics: that a font is a generic font if its name is either _equal_ 
-moz-fixed, monospace, serif, etc...

Suggesting WONTFIX for this bug -- unless there is a better definition.

Comment 3

18 years ago
Cc:ing attinasi since it appeared that he originally checked in that code as 
part of bug 31816 and bug 40340. There has been some changes since then however.
FirstExistingFont() isn't used anymore in the current code, I guess for perf 
reasons since the GFX font subsystem can skip pass inexisting fonts later.

Below is an excerpt of the original patch attached on bug 40340.
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=17394

+            // find the correct font if we are usingDocumentFonts OR we are 
overriding for XUL
+            // MJA: bug 31816
+            PRBool fontFaceOK = PR_TRUE;
+            PRBool isMozFixed = 
font->mFont.name.EqualsIgnoreCase("-moz-fixed");
+            if ((chromeOverride || useDocumentFonts)) {
+              fontFaceOK = (NS_SUCCEEDED(dc->FirstExistingFont(font->mFont, 
face)));
+            }
+            if (!fontFaceOK || !(chromeOverride || useDocumentFonts)) {
+              // now set to defaults
               font->mFont.name = defaultFont.name;
-              font->mFixedFont.name = defaultFixedFont.name;
+              font->mFixedFont.name= defaultFixedFont.name;
+            }

Comment 4

18 years ago
I am really not too pleased with the way -moz-fixed is used (can you spell
-moz-HACK?), however I think that as a proprietary and special-case mechanism it
should not matter if author rules that use -moz-fixed are treated differently
than they would be with 'normal' fonts. I agree with rbs that we should probably
not fix this. In other words, we should leave the requirement that -moz-fixed be
the only font specified if it is to be applied.
Adding keywords, etc.
Keywords: css-moz
Whiteboard: WONTFIX?
(Assignee)

Comment 6

17 years ago
Agreed: -moz-fixed is an internal hack.  WontFix
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WONTFIX
-moz-fixed should die, but whatever
Status: RESOLVED → VERIFIED

Updated

16 years ago
Blocks: 205537
You need to log in before you can comment on or make changes to this bug.