Reproduce: 1. Open testcase (will attach) Actual result: iiiiiiiiaaaaaaaaaaaaaaaaaaaa iiiiiaaaaaaaaa in a variable width font Expected result: iiiiiiiiaaaaaaaaaaaaaaaaaaaa iiiiiaaaaaaaaa in a fixed width font Additional comments: Observed with Linux build just built. Does not happen with 2000-10-03 nightly (and I didn't notice this bug with my former build from 2000-10-09 or -10). IMO MUSTFIX for M18, ccing Asa.
No, wait, please don't fix this bug - BugZilla looks much nicer with this bug ;).
Today I was seeing every single page use my default font, even <PRE> content or text files. I tried turning the "always use my font" pref on and back off, and now everything works.
Marc, please look into this. It may be a serious regression due to the change in font prefs.
Looking into it now.
My changes are only on the trunk, so I'm assuming this is being seen on the trunk (though it is not clear from the comments). Can somebody compare against the branch build? I am not seeing the bug with my trunk build from yesterday. I created a new profile and still, the testcase shows up in the monospace font. The comment from Decklin worries me, because it would suggest that the initial value of the font-pref is wrong, however I double-checked and the initial value is set to 'useDocumentFonts = TRUE', even if the pref value is not present.
Assignee: erik → attinasi
Hmm. I cannot reproduce this using either today's trunk or branch build on NT, nor can I reproduce it using my local builds from yesterday on NT or Linux. I have tried old and new profiles, and it didn't make any difference. I wonder if there is an issue with the profile value 'always use my fonts' having been already set when the pref didn't work and then suddenly working? I'll post a reference to this bug on some newsgroups and see if anybody else has seen it.
per dmose: today's 12:00 trunk build on linux shows me fixed width chars looking at the attachment
From howard, Mozilla contributor: "using Linux 2000101212, it looks okay as long as I don't use "always use my font settings."
From BenB: works fine with a new profile. Perhaps Ben can attach his prefs to see if we can find what may be causing this.
I spoke (chatted) with Ben B. and he had the 'always use my fonts' box checked in his profile. The problem is simply that when the pref to 'always use my fonts' is set, we are applying the variable space font instead of the monospace font to the PRE element. This is not directly related to the changes I made, however since the 'always use my fonts' pref is now working, we are seeing a problem in the font handling of the <PRE> element. If this is important enough, I might be able to special-case the -moz-fixed font in the code where the normal font handling is superceded for the pref, but that would also allow other style rules that specified -moz-fixed to get through. I'm not sure what the full impact would be.
Status: NEW → ASSIGNED
Update summary: problem only occurs when the option to 'always use my fonts' is set. Lowered severity to normal.
Severity: major → normal
Summary: <pre> in variable width font → <pre> in variable width font when pref to 'always use my fonts' is set
Same problem for <PRE>, <CODE>, and <TT>.
I have a fix for this now. The problem *was* in my changes. In nsCSSStyleRule.cpp and nsHTMLFontElement.cpp I was neglecting to set the font flags to NS_STYLE_FONT_USE_FIXED when the face is "-moz-fixed" when we were otherwise ignoring the font face (because the pref to 'always use my fonts' is set).
Created attachment 17164 [details] [diff] [review] Patch to fix monospace fonts when document fonts are being overriden via prefs.
I've attached the patch to fix this. If somebody wants to review it, or better yet take it and land it on the trunk, that would be great. I'm not sure if I can get approval to land this or not, but I'll try.
The fix for this was just checked into the branch (for bug 40340, along with the rest of the pref work that was landed on the trunk a week ago). Note to self: The trunk now needs to be updated with the attached patch so it is on par with the branch.
Fix ehceked into trunk - resolving as fixed. (nsHTMLFontElement.cpp, nsCSSStyleRule.cpp)
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
Marking verified in the 2001020308 linux build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.