Closed Bug 1120101 Opened 10 years ago Closed 10 years ago

incorrect positioning of some glyphs in vertical text when using 'vmtx' table for glyph advances

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Testcase using the TakaoPGothic font:[1] data:text/html;charset=utf-8,<div style="writing-mode:vertical-rl;font:36px TakaoPGothic">A「X」Z Note that the vertical variants of 「 and 」 are half-width characters; but the vertical 「 glyph renders incorrectly, overlapping the following X. This is because we use the advance from 'vmtx', but use a default vertical origin that assumes fixed vertical advances. The issue is that the HBGetGlyphVOrigin callback does not return the correct Y coordinate for the origin when a 'vmtx' table is present. According to [2], "The y coordinate of a glyph's vertical origin is specified as the sum of the glyph's top side bearing (recorded in the 'vmtx' table) and the top (i.e. maximum y) of the glyph's bounding box." So that's what we should implement. [1] Commonly present on Linux, for example; see http://www.filewatcher.com/m/TakaoPGothic.ttf.6234746-0.html [2] http://www.microsoft.com/typography/otspec/vmtx.htm
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
This shows the incorrect result we get due to this bug, and the correct result when we return a proper vertical origin for the glyphs.
Comment on attachment 8547070 [details] [diff] [review] Calculate vertical glyph origin based on 'vmtx' table in TrueType fonts Review of attachment 8547070 [details] [diff] [review]: ----------------------------------------------------------------- r+ with one minor nit fixed mLocaFormatLong would probably be more aptly named 'mLocaLongOffsets'.
Attachment #8547070 - Flags: review?(jdaggett) → review+
Target Milestone: --- → mozilla38
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: