Closed Bug 2439 Opened 26 years ago Closed 26 years ago

[PP] Links are not underlined correctly

Categories

(Core :: Layout, defect, P2)

PowerPC
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: pierre, Assigned: davidm)

References

()

Details

Another problem with fonts and attributes... Go to www.yahoo.com, for instance. ==> Look at the links: the underline touches the text. It should be one pixel below.
OS: All
Summary: [PP] Link are not underlined correctly → [PP] Links are not underlined correctly
in nsFontMetricsMac there is a function called GetUnderline which is supposed to return the offset to the base line currently it reads aOffset = NSToCoordRound(- float(mMaxDescent / 2) + dev2app ); I have no idea where this equation comes from but with small fonts mMaxDescent is small enough to give a 0 offset. Setting the offset to (- dev2app) gives a 1 pixel space between the base line and the underline. I don't know enough about fonts to say exactly where the underline is supposed to be.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I fixed it. The formula was wrong: it should be "aOffset = - dev2app". Note: the underline is still not displayed exactly as it should (at least on the Mac) because it's not a broken line under letters like pqQjg... I opened bug #2445 and assigned it to Kipp.
Status: RESOLVED → VERIFIED
Verified fixed in Jan 21 Mac build.
Status: VERIFIED → REOPENED
OS: All → Mac System 8.5
QA Contact: 4130
Rather than open another bug with the same summary I chose to reopen this one. This bug differs in tht it isn't across the board. i've only found it at one site so far. On the Mac with the 01/29/99 build: go to www.altavista.com none of the underlined links have anyspace between the text of the link and the underline itself. this page uses <font face= arial, helvitica> but I don't think that's anything special. I've only been able to reproduce this bug on G3's, not on PPC's running 8.5.1 but w/o the G3 chip, e.g. a 9600/300. It of course, works fine on Linux and Windows.
That's weird. It works for me on a PPC 225 with 8.5.1. Did you check on several G3s? Did you check with Nova on these machines? Does it have anything to do with your settings under Control Panels | Appearance | Fonts?
I can reproduce on my 9600 under 8.5. It looks okay under Nova ( of course the Old layout engine did real underlining ). Since it is the same font as Yahoo ( arial, helevetica ) I am a bit confused. It might be interesting to see if you have Arial installed ( I believe IE installs it ). I'll look into it some more.
c'mon guys. Yes I checked on several G3's. Yes I crosschecked with Nova. All of the machines have arial installed (including the 9600 I couldn't repro on). The iMac's I checked on all have the 'font for views' set to geneva10 in the appearance control panel. I have mine set to verdana9.
It's ok: since David could reproduce it, getting fix is just a matter of nano minutes.
Here is some simplified HTML which reproduces the problem <html> <sup>TM</sup> <a href="http://jump.altavista.com/cgi-bin/FF"><b>AV Family Filter</b></a> - </BODY></HTML> If you remove the <sup> tags it works. After looking at the math, it appears to me that in nsFontMetrics::GetUnderline() a NSToCoordRound should be done before assigning to aOffset and aSize so the code looks like aOffset = -NSToCoordRound( dev2app ); aSize = NSToCoordRound( dev2app );
Resolution: FIXED → ---
clearing Fixed resolution
David, you're right about the math: you can add the macros. I'm confused about the problem the <sup> tag, I would expected it to be cross-platform.
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
checked the fix in.
installing myself as QA Contact for sevaral bugs at once
Inserting Milestone info.
QA Contact: 4130 → 1698
LEts mark this VERIFIED_FIXED, Eli or Claudius...
Status: RESOLVED → VERIFIED
QA Contact: 1698 → 4130
verified fixed for MacMonkey99034 setting QA Contact back to myself
You need to log in before you can comment on or make changes to this bug.