Closed
Bug 154007
Opened 22 years ago
Closed 22 years ago
Mozilla's computed x-heights don't match real font x-heights
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: bugmail, Assigned: rbs)
References
(Blocks 1 open bug, )
Details
(Keywords: css2, testcase)
Attachments
(6 files)
When an "x" character glyph is displayed next to an image whose height is
defined to be 1ex in CSS, the height of the x glyph and the image aren't the same.
Comment 3•22 years ago
|
||
This is a dup of the bug to implement getBoundingMetrics on Mac (or something).
I think this should stay open, but depend on that bug.
Depends on: 74821
Taking. This is needed for nicer MathML alignments.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: MacOS X → All
--> meant to re-assign.
Assignee: dbaron → rbs
Status: ASSIGNED → NEW
Comment 8•22 years ago
|
||
Note that the width of the images makes it easy to see whether we're varying
the definition by font. (We currently are on Linux.)
Does this do the trick? I read the documentation at:
http://developer.apple.com/technotes/te/te_21.html#Section8
http://www.mactech.com/articles/develop/issue_09/Ressler_article.html
[BTW, there seems to be a difference of GfxMac vs. other platforms. It seems
that the Mac gets its CSS metrics (e.g., emheight, maxAscent, maxDescent, etc)
from the first font, instead of the first ASCII font. So if somebody uses
"font-family: Symbol, Times", the metrics might come from Symbol. That isn't
the case on other platforms where the CSS metrics are taken from the first
ASCII font. Also, I am not sure if the CSS ordering (i.e., font switching) is
totally honored when hunting for glyphs. There seems to be some voodoo going on
w.r.t. the 'script' business and since I can't test, I cannot confirm / deny
what I am alluding.]
Comment 10•22 years ago
|
||
roger, your patch works correctly for me.
Assignee | ||
Comment 11•22 years ago
|
||
dbaron/peterv/sfraser, either of you care to r/sr based on schofield's testing?
http://bugzilla.mozilla.org/attachment.cgi?id=91775&action=edit
I will be driving his patch for bug 107146 and closing this little gem will
clear the way (and my tree...). Also, the API that I used is the same that he is
using over there.
Status: NEW → ASSIGNED
Reporter | ||
Comment 12•22 years ago
|
||
rbs@maths.uq.edu.au, are you saying that bug 107146 depends on this bug being fixed?
Assignee | ||
Comment 13•22 years ago
|
||
No. I am saying that I am the one who will apply and checkin the bigger patch
for the other bug -- and it would be convenient if my tree is clean, and that it
isn't bad to checkin a little snippet that is using the measuring API that is
being used for the other bigger patch.
Attachment #91775 -
Attachment description: tentative patch - untested → patch - tested
Comment 14•22 years ago
|
||
Comment on attachment 91775 [details] [diff] [review]
patch - tested
r=ftang
Attachment #91775 -
Flags: review+
Comment 15•22 years ago
|
||
Comment on attachment 91775 [details] [diff] [review]
patch - tested
sr=sfraser
Attachment #91775 -
Flags: superreview+
Comment 16•22 years ago
|
||
Comment on attachment 91775 [details] [diff] [review]
patch - tested
a=asa (on behalf of drivers) for checkin to 1.1
Attachment #91775 -
Flags: approval+
Assignee | ||
Comment 17•22 years ago
|
||
Checked in -- When I hit enter, I realised that I forgot to add the a= on the
checkin comment...
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 18•22 years ago
|
||
This does appear to be fixed in FizzillaCFM/2002080203. However, there does
appear to be occasional discrepancy due to text antialiasing. I'll attach a
screenshot of testcase 2.
Reporter | ||
Comment 19•22 years ago
|
||
Note that, in examples 4 and 5, the 5em x is 1px taller than the img.
Assignee | ||
Comment 20•22 years ago
|
||
Do you have a comparative screenshot using an earlier build without the patch?
Reporter | ||
Comment 21•22 years ago
|
||
Sure, here's one. This shows how bad it was before your patch.
Reporter | ||
Comment 22•22 years ago
|
||
Use this testcase to observe what I'm talking about. The difference is most
apparent at even px sizes between about 74 and 90. This may not be a problem
with your patch, or even with Mozilla, but could be related to the text
antialiasing. Or, it could be a rounding error in Mozilla, who knows.
You need to log in
before you can comment on or make changes to this bug.
Description
•