Closed Bug 661157 Opened 13 years ago Closed 13 years ago

inaccurate horizontal alignment (deviation 2px)

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kdevel, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

User-Agent:       
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110601 Firefox/7.0a1

The left border of the third column (dd.mm.yy hh:mm) is not accurately left aligned if hh is "11". 

Reproducible: Always

Steps to Reproduce:
1. open url
2. scroll and check the horizontal alignment of the third column

Actual Results:  
Columns misaligned by 2px if hh = "11"

Expected Results:  
Display all columns left aligned as in FF 3.5, 3.6 and FF 4 up to at least 4.0b8pre (2010-11-22-03-mozilla-central).
Attached image screenshot
Version: unspecified → Trunk
Summary: inaccurat horizontal alignment (deviation 2px) → inaccurate horizontal alignment (deviation 2px)
Attachment #536867 - Attachment mime type: text/plain → text/html
I took a look into the font file. It seems that there is a kerning pair due to which the letter spacing between to 1s is reduces. FF 3.5 and 3.6 do not take this kerning into account (unless you zoom in),
Thanks for the Testcase!

Regression Range against WinXP:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f47972d05473&tochange=dc2939f2640d
=> Harfbuzz defaulting.

The Regression Range is the same as in Bug 605043 if you force "gfx.font_rendering.harfbuzz.level" to "1":
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=beab39d49de9&tochange=b26489e73818
Blocks: 569531, 575695
Status: UNCONFIRMED → NEW
Component: General → Layout: Text
Ever confirmed: true
Keywords: regression, testcase
OS: Linux → All
Product: Firefox → Core
QA Contact: general → layout.fonts-and-text
Hardware: x86_64 → All
(In reply to comment #3)
> I took a look into the font file. It seems that there is a kerning pair due
> to which the letter spacing between to 1s is reduces.

Sounds like this is not a bug, then - Firefox is rendering the text correctly according to the font. There's no expectation that digits will be monospaced in every font; if you want them to be monospaced, you need to choose a font that specifically provides this.

> FF 3.5 and 3.6 do not
> take this kerning into account (unless you zoom in),

This was a limitation in earlier versions - for small text sizes, it used a "quick-and-dirty" text rendering path that didn't fully take account of layout features in the fonts.
(In reply to comment #5)
> Sounds like this is not a bug, then - Firefox is rendering the text
> correctly according to the font.

I agree. Nonetheless the behavior is unexpected.

> There's no expectation that digits will be monospaced in every font; 

There is obviously such an expectation but there's no such guarantee.

> if you want them to be monospaced, you need to
> choose a font that specifically provides this.

The arial family (as the tnr) provides numerals with same width, but they also have a single inter-numeral kerning pair (one-one). In order to prevent this kerning one can let some zero-width space (e.g. ZWJ = U+200D) drop between the ones. But then one runs into issues with FF 3.5 and 3.6 (see zl.html).

For the sake of completeness: Safari on iPad, konqueor and google chrome all behave as "expected".
Attachment #536895 - Attachment mime type: text/plain → text/html
That's because Webkit doesn't do kerning unless you ask for it.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: