Closed Bug 573407 Opened 9 years ago Closed 9 years ago

Wrong glyph position after double quotes in italic

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: sylvain.pasche, Assigned: jfkthame)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

Testcase: data:text/html,<i>"Lorem</i>

The "L" glyph is positioned at the same place as the double quote, as if the double quote had no width. I can see it on Windows 7, but not on XP or Linux.

Regression range: 
Works: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a3pre) Gecko/20100315 Minefield/3.7a3pre
Broken: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a4pre) Gecko/20100316 Minefield/3.7a4pre

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=17a3e86d5ec5&tochange=050887c64183
Keywords: regression, testcase
Whiteboard: regression testcase
Likely regression from bug 502906?
Blocks: 502906
blocking2.0: --- → ?
I think this is a Windows 7 Uniscribe and/or Times New Roman font bug. The same problem occurs with Times New Roman Italic in Notepad on Win7.

Bug 502906 exposed this because it caused us to use the Uniscribe rendering path by default, but it's not really our bug.

I see the same problem with the directwrite font backend, incidentally, so even if we revert to using GDI rendering by default, the problem will persist/return as we move to dwrite.

The harfbuzz backend does not have this problem, so setting gfx.font_rendering.harfbuzz.level = 1 on a trunk build will resolve it.
See also:
436087
491389
540475
573407
This bug has been around long enough, and still happens on the latest & greatest version. Let's confirm and get started on a fix.
JeffEvarts, the bug this bug report is about is a bug in Windows itself.  See comment 3.  The only way to "fix" is to somehow detect the OS-level braindamage and try to do "something else".  Whatever that would be...
Does this occur in other browsers?
Doesn't occur in Chrome or IE8, but do they use uniscribe?

Could we just pick a different default serif font, such as Georgia? It sounds like we need to do *something* here, since "L isn't an especially uncommon combination.
blocking2.0: ? → betaN+
Assignee: nobody → jfkthame
(In reply to comment #7)
> Could we just pick a different default serif font, such as Georgia? It sounds
> like we need to do *something* here, since "L isn't an especially uncommon
> combination.

We could, although that wouldn't help in the (common, I'd guess) case of pages where the CSS explicitly calls for Times.

I think changing our default font would need to be a UX decision, not purely an engineering one.
The root of the problem seems to be an error in the timesi.ttf font shipped on Windows. In the GDEF (glyph definition) table, glyph ID 5 "quotedbl" is marked as being class 3, which is defined (in http://www.microsoft.com/typography/otspec/GDEF.htm) as being "Mark glyph (non-spacing combining glyph)". This causes Uniscribe to ignore the advance width of the glyph as found in the font's metrics table, and force it to be rendered as zero-width instead.
Duplicate of this bug: 436087
Duplicate of this bug: 491389
Duplicate of this bug: 540475
This is fixed as a result of bug 569531: now that we're using harfbuzz on Windows, the problem no longer occurs.
No longer blocks: 502906
Status: NEW → RESOLVED
Closed: 9 years ago
Depends on: 569531
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.