Closed Bug 76191 Opened 23 years ago Closed 23 years ago

HTML source should use a monospace (fixed width) font

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: hwaara, Assigned: cmanske)

References

Details

Attachments

(2 files)

The font that is used when editing HTML source isn't the one you expect when
editing code in any form.

Not only is it easier to read the source if it's in a proportional, fixed-width
font (like Monaco, Courier etc.) but it's also a widely (unwritten) used
standard among IDEs.

Currently, it's a pain to use the HTML source editing feature with it's
sans-serif font.

Change it to be the same font as when you're editing plain-text emails in
msgcompose (mailnews).
-->cmanske
Assignee: beppe → cmanske
OS: Windows 98 → All
Hardware: PC → All
Summary: HTML source font should be monospace (proportional) → HTML source font should be monospace (proportional) fixed width
Umm, "proportional" is the opposite of "monospace". You are confusing sans-serif
vs serif (e.g., Arial=sans-serif proportional, Times=serif proportional) with
"proportional" vs. "monospace"
I agree that the HTML source should use monospace, which is Courier (and also
"serif").
Should be easy to fix via CSS.

Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Yeah, sorry about that. Good that you got the point though. :)
Summary: HTML source font should be monospace (proportional) fixed width → HTML source should use a monospace (fixed width) font
I think Lucidia Console is a good font for this on windows.
Wow, a good san-serif monospace font face! Lucida Console is nice, but is that
very common on non-Windows platforms?
The correct question is really: Any other favorite monospace fonts for various
platforms? We can include > 1 in the CSS "font-family" attribute, so we might
as well pick some that work best on each platform.
Monaco got a vote (macos)
LucidaSansTypewriter (?)
Since almost all platforms have Courier pre-installed, I think we should back
the font-faces up with that in case none of the other monospaces are available.
Erm, why don't we just use the default monospace font?
Simon is right; if people really want to use something else they can change
their preference.
Huh? Didn't sfraser just say that we should use the default monospace?

Brade: this shouldn't be a pref, imho, it should be monospace by default.
Of course it will be "monospace", but CSS lets you put > 1 "font-family" in a
row, so I was only asking if there were other platform-specific choices
No pref involved -- this will be part of the theme files anyway, so if someone
really wants something different, they can change the theme CSS.
The default "monospace" seems to be Courier, bty.
I decided to keep it simple and just use "monospace" and skip the other
suggestions.
Ready for review.
Keywords: patch, review
Whiteboard: FIX IN HAND need r=, sr=
cool!

r=hwaara
Changes look fine to me, s/r=kin@netscape.com

I'm just curious if the "font-size: larger" looks ok on mac?
I'm curious as well - it doesn't work at all on Windows (nor any other CSS
font size change) I'll file a bug on that.
Whiteboard: FIX IN HAND need r=, sr= → FIX IN HAND
Why does this have changes for mac and windows, but not Unix?  And why does it
have changes in an XP file plus the two platform-specific files?

After applying the patch, I still see variable-width on Unix.
Oh, I see: there is no unix directory there, classic unix uses the windows theme.

I use modern; but if I apply classic, I still see variable-width fonts in the
plaintext editor after applying the patch and remaking in mozilla/themes. 
(Should I have to build anywhere else?)
hmmm. wonder if that's a Linux CSS bug. I've seen "monospace" used in other CSS
files. I'll attach another file so you can test if setting to specific font like
"courier" works. That font exists on Linux, right?
Akkana: You do see monospace with Modern theme? And yes, just build in themes
directory
checked in, but I won't mark fixed until proven to work on all platforms.
Works like a charm on Windows. Thanks for fixing this Charles!
I would suggest using "-moz-fixed" instead of "monospace".  "-moz-fixed" is the 
font chosen by the user in prefs for their fixed-width font....

(sorry for the really late comments; just found this bug).
Thanks, good idea, Boris (Wish I'd known that earlier!)
It doesn't hurt to use this:
    font-family   : -moz-fixed, monospace;
so there's backup, correct?
sr=kin@netscape.com on the 04/30/01 10:25 patch.
r=bzbarsky@mit.edu on the 4/30 patch.  Using monospace as well is a very good
idea, yes.
I don't think the newest patch should be checked in until we get "monospace" 
working on Mac (why mask a bug?)
'monospace' doesn't work on Mac?? Is there a bug?
very strange; in my Mac build from today, I wasn't getting a monospace font 
earlier but now I am!
Sorry to be the bearer of bad news, but linux still doesn't show a fixed width
font even with the new patch (only tried modern skin).
Akkana, worksforme on Linux with a pull from today and this patch.

What font do you have set as your monospace font in preferences?
checked in. I think any issues left (e.g. on Linux) are different bugs.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND
Blocks: 78441
Still not fixed width on linux in today's builds.

My fixed-width font is currently set at "misc-fixed-iso8859-1" size 14.
Other windows which are supposed to use fixed width font (e.g. plaintext mail)
do so.  It's just plaintext compose that doesn't work.

If you think there's another bug here, please give me a pointer to it.  I'm not
aware of any problems showing fixed-width fonts on linux.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Somehow I got dropped from the cc, that's why I didn't see when this bug was
marked fixed.
Please see bug 78441. That has the new diff that should make this work.
I know I should have dupped that to this bug, but it has comments that reveal
why Linux has problems.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
The patch in bug 78441 doesn't fix this bug.  I've commented there.  We can use
that bug to track this issue if you prefer (though if we're going to do that, we
should probably change the summary of that bug since it's very specific and has
nothing to do with the plaintext compose window).
Charley closed 78441 as fixed, but this bug is still open; the font in the
plaintext editor is still variable width.  Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
But this bug was about HTML Source, not plain text editor. Others have said we
do see monospace in HTML source, do you?
I'm not sure whether or not we should use it in Plain text editor, but it's moot
since that won't be exposed in next release. If you want it, please file separate
bug.
I'll file bug about font size issue.
Oops, you're right.  Sorry, I thought this covered the plaintext editor.
Filed bug 79277 about that issue; re-closing this.  The source panel looks fine
to me in today's build.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
verified in 5/30 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: