Closed Bug 111054 Opened 23 years ago Closed 20 years ago

style sheet monospaced text overlaps proportional text.

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: gfranken, Unassigned)

Details

(Keywords: css1, platform-parity, testcase, Whiteboard: [CSS1-5.2.2][CSS1-5.4.6])

Attachments

(3 files)

If you a style-sheet to set body text to justify, and then have some text in a
proportional font, then some monospaced text, then switch back to the
proportional  text font, the monospaced text will overlap the proportional text.

As an example, here's a short html document, and the corresponding style sheet:
 
<!------ monospace_test.html -->
<html><head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<title>Font Test</title>
<link rel="stylesheet" type="text/css" href="monospace_test.css" /></head>
<body>
<div>
This is a test of a monospaced <code>This is monospaced--(will it work?)--I
don't know,</code> font in Mozilla.
</div>
</body>
</html>


/* monospace_test.css */
body
{
text-align: justify;
}
code
{ font-family: Andale Mono, Lucida Console, monospaced;
	font-weight: 600;
	font-size: 10pt;
}

div
{ margin-left: 30px;
  margin-right: 30px;
  margin-bottom:10px;
}
->Layout
Assignee: dbaron → attinasi
Component: Style System → Layout
QA Contact: ian → petersen
Confirming issue in the Windows ME build (2001-12-03-08).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached image screen grab of overlap
confirming the issue using the build from 2001121103 on win98, teh attached
screen grab shows what the overlap looks like
Target Milestone: --- → mozilla1.2
Looks fine on Linux, can someone look at this again on 98 or ME?
Keywords: css1, testcase
Whiteboard: [CSS1-5.2.2][CSS1-5.4.6]
Looks fine on Windows 2000 (Build 2002052408).
Looks bad (like in the screenshot) using mozilla1.0 on Win98.
WorksForMe using FizzillaCFM/2002070913.
Looks like screen 7-14 trunk winME.  9x specific?
Investigated more.  Looks like a bug in Lucidia Console or the OS.  When I
remove Lucidia Console from the <code> style rule, the original testcase
renders fine.  In this attachment, the text continues beyond the border of it's
containing element (no widths defined).  Therefore, I think Mozilla thinks the
font is narrower than it really is (could be a problem with what the OS is
telling Mozilla, although IE seems to calculate the width properly).  Should we
just substitute something else for Lucidia Console, or can someone come up with
a solution?

One more question (might be relevant): How does Mozilla calculate how wide a
phrase is?
->Fonts & Text
Assignee: attinasi → font
Component: Layout → Layout: Fonts and Text
QA Contact: chrispetersen → ian
Keywords: pp
Is this still a bug? A similar issue was fixed in bug 52596. Maybe that patch
covered this bug as well. I don't have Win95/98 and cannot test.
Testcase renders correctly on my WinME computer in 1.6. (Outdated, but I don't
want to bother installing a current build.)  This can be resolved fixed or WFM
(doesn't matter).
The 1.6 release is precisely the milestone when bug 52596 was fixed. It would be
great if you can test with a current build. I am marking this FIXED based on the
comment above.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Verifying using mozilla1.7rc1 on WinME.
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: