Closed Bug 410917 Opened 14 years ago Closed 14 years ago

HTML <sub> looks more like <sup>

Categories

(Core :: Graphics, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: raoul.behrend, Assigned: mats)

References

()

Details

(Keywords: compat, platform-parity)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Hello,

I'm generating the following webpage: http://obswww.unige.ch/~behrend/pageccou.html#v00219 .

I use
LB<SUB>84</SUB>
to subscript the indice. Attached is nobug-netscape.jpg which shows the correct interpretation of that code. bug-firefox.jpg shows that indices are superscripted insteed of being subscripted in FireFox 2.0.0.11 under windows xp-familly.

Kindest regards, R. Behrend 

Reproducible: Always

Steps to Reproduce:
1. Download for example http://obswww.unige.ch/~behrend/pageccou.html#v00219
2.
3.
Actual Results:  
See bug-firefox.jpg

Expected Results:  
nobug-netscape.jpg
works for me in FF2.0.11, FF3.0b2, Seamonkey trunk 2 days old on Vista
(looks identical to screenshot 1)
Additional WFM for SM 1.1.7 on XP.
Note similar report: bug 404073.
I suspect this is due to an installed font with strange (possibly bogus)
font metrics.

R. Behrend, can you please provide details on your Firefox font settings
and which fonts you have installed on this system?  Thanks.
Summary: html subsripting → HTML <sub> looks more like <sup>
The default font I used is "Swiss721 BT" from the now-very-old worperfect 8 suite (I think that it is the most clear font). Changing it to Tahoma, the indices are correctly displayed.

Trying other fonts from that suite, some aren't displayed correctly, some correctly.

If you want to investigate the font metrivs, I uploaded the four FFT-files to http://obswww.unige.ch/~behrend/tempo/firefox/ . These files will be deleted in one week.

Thank you all for a *great* software.
Thanks for providing the font, I can now reproduce the problem in a
Firefox trunk debug build on Windows.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Component: General → GFX: Thebes
Ever confirmed: true
Keywords: pp
Product: Firefox → Core
QA Contact: general → thebes
Attached patch Patch rev. 1 (obsolete) — Splinter Review
The provided "Swiss721 BT" font has a negative subscript offset.

We already have a fix for this on Linux and OS2:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxPangoFonts.cpp&rev=1.121&root=/cvsroot&mark=531-532#509
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxOS2Fonts.cpp&rev=1.26&root=/cvsroot&mark=153-154#145
It's not an issue for gfxAtsuiFonts.cpp:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxAtsuiFonts.cpp&rev=1.78&root=/cvsroot&mark=297#246
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Attachment #295623 - Flags: superreview?(vladimir)
Attachment #295623 - Flags: review?(vladimir)
Duplicate of this bug: 411038
Duplicate of this bug: 404073
Isn't this font bug? If so, the code should be in XP code. I'm requesting that in bug 402524.
(In reply to comment #11)
> Isn't this font bug?

Yes.

> If so, the code should be in XP code. I'm requesting that in bug 402524.

Sure, we could add it at the top of gfxFont::CorrectMetrics, but let's do
that after bug 402524 has landed (here or in a separate bug).
Comment on attachment 295623 [details] [diff] [review]
Patch rev. 1

Looks OK to me; but would like stuart to also take a look since it's touching the windows font stuff. I take it the superscript offset never has the wrong sign?
Attachment #295623 - Flags: superreview?(vladimir)
Attachment #295623 - Flags: superreview?(pavlov)
Attachment #295623 - Flags: review?(vladimir)
Attachment #295623 - Flags: review+
(In reply to comment #13)
> I take it the superscript offset never has the wrong sign?

I can't find any bugs filed that would indicate that.  I guess we could
preemptively fix it with a PR_ABS, but I think we should wait until we
have proof it's actually needed.
Comment on attachment 295623 [details] [diff] [review]
Patch rev. 1

Can anyone come up with legit reasons why this would be positive?
also, please us fabs() here... I'd like to move away from NSPR ;-)
poke?
Attachment #295623 - Attachment is obsolete: true
Attachment #298596 - Flags: superreview?(pavlov)
Attachment #295623 - Flags: superreview?(pavlov)
(In reply to comment #15)
> (From update of attachment 295623 [details] [diff] [review])
> Can anyone come up with legit reasons why this would be positive?
> 

was kind of hoping for an answer to this before reviewing;)
Stuart, it doesn't look like anyone objects to the fix.
IE7 and Opera9.25 on XP also doesn't honor the negative value and we
already do this on other platforms.
Keywords: compat
Attachment #298596 - Flags: superreview?(pavlov) → superreview+
Attachment #298596 - Flags: approval1.9?
Comment on attachment 298596 [details] [diff] [review]
Patch rev. 2, using fabs()

a=beltzner
Attachment #298596 - Flags: approval1.9? → approval1.9+
mozilla/gfx/thebes/src/gfxWindowsFonts.cpp 	1.168 

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
You need to log in before you can comment on or make changes to this bug.