Closed
Bug 112502
Opened 23 years ago
Closed 19 years ago
<sup> or "vertical-align:super" changes the position of text too higher
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: kazhik, Assigned: hsaito54)
Details
(Keywords: css1, platform-parity, Whiteboard: [CSS1-5.4.4])
Attachments
(7 files, 4 obsolete files)
<sup> or "vertical-align:super" changes the position of text too higher.
Testcase:
http://bugzilla.mozilla.gr.jp/showattachment.cgi?attach_id=419
Linux build doesn't have this problem.
Comment 1•23 years ago
|
||
Could we have a screenshot showing the problem? I don't remember seeing this
problem when I was using Windows.
Reporter | ||
Comment 2•23 years ago
|
||
Updated•23 years ago
|
Target Milestone: --- → Future
Reporter | ||
Comment 3•23 years ago
|
||
This problem appears with Japanese font.
Text in Verdana or "Times New Roman" is displayed correctly.
Testcase:
http://bugzilla.mozilla.gr.jp/showattachment.cgi?attach_id=592
Comment 5•22 years ago
|
||
.
Assignee: attinasi → font
Component: Layout → Layout: Fonts and Text
QA Contact: cpetersen0953 → ian
Target Milestone: Future → ---
Comment 6•22 years ago
|
||
This page also seems to work as a testcase.
http://slate.msn.com/id/2080825/
Updated•22 years ago
|
Priority: -- → P3
Target Milestone: --- → Future
Comment 7•21 years ago
|
||
jshin, aren't you hacking on this sort of stuff right now?
Comment 8•21 years ago
|
||
Yeah, but it's a Xft-specific bug. This is on Windows. Anyway, I'll take a look.
The testcase in comment #3 uses MS Gothic(MS ゴシック0, right? It could well
be due to a mistake on the font side. dbaron is not fond of overriding what's
specified in the font (not that this kind of 'overshooting' can be fixed by what
I pondered over in bug 225109, which is for too small super/sub offsets.)
OT: When you specify a CJK font in CSS, you need to specify both 'native' names
(in CJK) AND English names because not all platform support 'native' font names.
Actually, native font names are supported only ON CJK version (or Win2k/XP with
CJK locale as the system locale) of Win9x/ME/2k/XP. That is, instead of
font-family: MS ゴシック, sans-serif
you have to use
font-family: MS ゴシック, MS Gothic, sans-serif
Comment 9•21 years ago
|
||
In the previous comment, the CSS font. specification issue is about the testcase
in comment #3.
Anyway, how does MS IE handle the page? I'm being too lazy to turn on vmware on
my Linux box to test it myself :-)
Comment 10•21 years ago
|
||
Indeed, MS IE doens't show the problem while Mozilla 1.5 still has the problem.
Comment 11•21 years ago
|
||
In addition to bug 225109, see also bug 227452 (about different GFX ports using
different conventions for super/sub positions). I can easily take care of all of
these (so can anyone here), but we need to decide what we want to do first.
Comment 12•20 years ago
|
||
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050723
SeaMonkey/1.0a
Screenshot of testcase attachment 135555 [details] all selected and zoomed to 200%
Same look in all zoom states, only size changes.
Assignee | ||
Comment 13•19 years ago
|
||
I think that Japanese font (ex. MS Mincho and MS Gothic) on windows have wrong outline's text metrics. If |oMetrics.otmptSuperscriptOffset.y| is zero, the superscribed text is placed on base line of base text and if it is equel to |metrics.tmAscent|, the superscribed text is placed on top of base text. I expect that the both of |oMetrics.otmptSuperscriptOffset.y| and |oMetrics.otmptSubscriptOffset.y| are checked the range.
Attachment #203794 -
Flags: review?
Assignee | ||
Comment 14•19 years ago
|
||
I think that Japanese font (ex. MS Mincho and MS Gothic) on windows have wrong outline's text metrics. If |oMetrics.otmptSuperscriptOffset.y| is zero, the superscribed text is placed on base line of base text and if it is equel to |metrics.tmAscent|, the superscribed text is placed on top of base text. I expect that the both of |oMetrics.otmptSuperscriptOffset.y| and |oMetrics.otmptSubscriptOffset.y| are checked the range.
Attachment #203795 -
Flags: review?(rbs)
Assignee | ||
Comment 15•19 years ago
|
||
Comment on attachment 203794 [details] [diff] [review]
patch
Sorry, I missed the operation.
Attachment #203794 -
Attachment is obsolete: true
Attachment #203794 -
Flags: review?
Assignee | ||
Comment 16•19 years ago
|
||
Assignee | ||
Comment 17•19 years ago
|
||
This indicates an effect for superscribed text.
Comment 18•19 years ago
|
||
Comment on attachment 203795 [details] [diff] [review]
patch
- Try using the exact xheight (it is calculated somewhere around there, instead of this 50% of ascent)
- Also try using 4/5 of xheight as the offset. (MathML uses a more complicated algorithm, but it uses that as fallback value).
Assignee | ||
Updated•19 years ago
|
Attachment #203795 -
Flags: review?(rbs)
Assignee | ||
Comment 19•19 years ago
|
||
When a wrong value is in one of <sup> and <sub>, both use a calculated value, since it seems that the subscribed text is lower than best position.
The case of MS Mincho and MS Gothic, each value is listed as follows.
ascent 14 pixel
descent 2
x-height(56% of ascent) 7
x-height(glyph metrics) 7
superscript offset 14 (original) 5 (80% of x-height)
subscript offset 6 (original) 4 (60% of x-height)
Attachment #203795 -
Attachment is obsolete: true
Attachment #203801 -
Attachment is obsolete: true
Attachment #204022 -
Flags: review?(rbs)
Assignee | ||
Comment 20•19 years ago
|
||
Updated•19 years ago
|
Assignee: layout.fonts-and-text → saito
Comment 21•19 years ago
|
||
See also bug 225109.
Comment 22•19 years ago
|
||
> I think that Japanese font (ex. MS Mincho and MS Gothic) on windows have wrong
> outline's text metrics.
Care to also attach a screenshot of what IE is doing with these fonts? This way, we know from now on whether they are also overriding the bad font metrics.
Assignee | ||
Comment 23•19 years ago
|
||
Attachment #204023 -
Attachment is obsolete: true
Assignee | ||
Comment 24•19 years ago
|
||
Comment on attachment 204022 [details] [diff] [review]
patch2
It seems that patch2 is suitable for alphabet since the offset is calculated using x-height, however the case of kanji, superscribed text is too lower.
Attachment #204022 -
Attachment is obsolete: true
Attachment #204022 -
Flags: review?(rbs)
Assignee | ||
Updated•19 years ago
|
Attachment #203795 -
Flags: review?(rbs)
Assignee | ||
Updated•19 years ago
|
Attachment #203795 -
Attachment is obsolete: false
Attachment #203795 -
Flags: review?(rbs)
Assignee | ||
Comment 25•19 years ago
|
||
Comment on attachment 203795 [details] [diff] [review]
patch
Sorry, I missed the operation again.
Attachment #203795 -
Flags: review?(rbs)
Assignee | ||
Comment 26•19 years ago
|
||
Comment 27•19 years ago
|
||
Comment on attachment 203795 [details] [diff] [review]
patch
r=rbs
Attachment #203795 -
Flags: review?(rbs) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #203795 -
Flags: superreview?(rbs)
Comment 28•19 years ago
|
||
Comment on attachment 203795 [details] [diff] [review]
patch
sr=rbs
Attachment #203795 -
Flags: superreview?(rbs) → superreview+
Assignee | ||
Comment 29•19 years ago
|
||
Thanks rbs, could you check in to the trunk?
Comment 30•19 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Target Milestone: Future → mozilla1.9alpha
You need to log in
before you can comment on or make changes to this bug.
Description
•