Closed
Bug 588731
Opened 14 years ago
Closed 14 years ago
svg text metrics incorrect with harfbuzz/GDI backend
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta5+ |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(2 files)
355 bytes,
application/xhtml+xml
|
Details | |
831 bytes,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
Turning on harfbuzz (gfx.font_rendering.harfbuzz.level=1) under GDI on Windows leads to errors in text layout for SVG text. The attached example illustrates the problem; it displays correctly with harfbuzz off, or with harfbuzz/dwrite, but the glyph positioning is wrong with harfbuzz/gdi.
Assignee | ||
Comment 1•14 years ago
|
||
This occurs because the SVG text code uses a temporary gfxContext when creating glyph runs; when the harfbuzz shaper calls back to gfxGDIFont::GetHintedGlyphMetrics, this context has not been set up with the appropriate font and so we get metrics for the default Windows font and size instead. In the "normal" (non-SVG-text) case, the current DC has been set up appropriately at a higher level, which is why this issue only shows up within SVG, not HTML text. This fixes a collection of mochitest failures that were occurring with harfbuzz enabled on windows.
Assignee: nobody → jfkthame
Attachment #467372 -
Flags: review?(jdaggett)
Updated•14 years ago
|
Attachment #467372 -
Flags: review?(jdaggett) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Comment on attachment 467372 [details] [diff] [review] patch, v1 - ensure the proper font is selected into the DC when getting glyph metrics Requesting approval to land this on trunk. Although this is part of the build, it is currently preffed off; we need this fix in place before we can flip the pref to turn on harfbuzz by default on Windows/GDI.
Attachment #467372 -
Flags: approval2.0?
Comment 3•14 years ago
|
||
Comment on attachment 467372 [details] [diff] [review] patch, v1 - ensure the proper font is selected into the DC when getting glyph metrics I'd even block
Attachment #467372 -
Flags: approval2.0?
Assignee | ||
Comment 5•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c6da8fefd6a8
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•