Closed Bug 615121 Opened 9 years ago Closed 9 years ago

vertical glyph offsets are inverted

Categories

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

defect
Not set

Tracking

()

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

People

(Reporter: karlt, Assigned: karlt)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

An operator precedence error from bug 605043 means that the y-axis glyph
offsets are not correctly inverted, so GPOS offsets get applied in the wrong
direction when the HarfBuzz shaper is enabled on Linux.
Attached patch patchSplinter Review
I don't understand why the bug is not showing up in the same way on other
platforms.  With GDI and DWrite, fixing the error changes the positions in 
layout/reftests/text/475092-pos.html by only one pixel, which makes it pass.
(The reftest still doesn't pass on Linux or Mac - see bug 482596 - but is much
closer on Linux at least.)
Assignee: nobody → karlt
Status: NEW → ASSIGNED
Attachment #493586 - Flags: review?(jfkthame)
blocking2.0: --- → ?
Attachment #493586 - Flags: review?(jfkthame) → review+
(In reply to comment #1)
> Created attachment 493586 [details] [diff] [review]
> patch
> 
> I don't understand why the bug is not showing up in the same way on other
> platforms.

It does... I just noticed it a couple of days ago on OS X, when testing a complex Arabic-script font that used to work; was intending to file and investigate, but you got there first - thanks!
blocking2.0: ? → betaN+
Duplicate of this bug: 615145
OS: Linux → All
Hardware: x86_64 → All
We should add a testcase to catch this, especially as y-axis sign errors are so easy to make, and not always obvious at first because vertical deltas are rarely used. I think we can do something using @font-face with a font that's known to support vertically-stacked marks...
Here are a couple of reftests using the Scheherazade font that we have in the reftest fonts directory; they will fail if we make a sign error handling the glyph y-offsets.
Attachment #493667 - Flags: review?(karlt)
Comment on attachment 493667 [details] [diff] [review]
reftests for direction of vertical glyph offsets

Nice, thank you!
Attachment #493667 - Flags: review?(karlt) → review+
Pushed this to trunk:
http://hg.mozilla.org/mozilla-central/rev/3e3726fc8083 (patch)
http://hg.mozilla.org/mozilla-central/rev/a5aafda069f7 (tests)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.