summaryrefslogtreecommitdiff
path: root/vcl/generic/glyphs/gcach_layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/generic/glyphs/gcach_layout.cxx')
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index ca40e9d69d97..eef1fd08f201 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -67,7 +67,6 @@ bool ServerFontLayout::LayoutText( ImplLayoutArgs& rArgs )
}
// -----------------------------------------------------------------------
-
void ServerFontLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
GenericSalLayout::AdjustLayout( rArgs );
@@ -91,6 +90,18 @@ void ServerFontLayout::AdjustLayout( ImplLayoutArgs& rArgs )
}
}
+void ServerFontLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
+{
+#if ENABLE_HARFBUZZ
+ // No idea what issue ApplyDXArray() was supposed to fix, but whatever
+ // GenericSalLayout::ApplyDXArray() does it just breaks our perfectly
+ // positioned text.
+ const char* pUseHarfBuzz = getenv("SAL_USE_HARFBUZZ");
+ if (!pUseHarfBuzz)
+#endif
+ GenericSalLayout::ApplyDXArray(rArgs);
+}
+
// =======================================================================
static bool lcl_CharIsJoiner(sal_Unicode cChar)
@@ -423,13 +434,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
aNewPos = Point(aNewPos.X() + aHbPositions[i].x_offset, aNewPos.Y() - aHbPositions[i].y_offset);
GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth);
-
- // This is a hack to compensate for assumptions made elsewhere in
- // the codebase, the right way is to use aHbPositions[i].x_advance
- // instead of nGlyphWidth above, and leave mnNewWidth alone
- // (whatever it is meant for)
- if (i + 1 < nRunGlyphCount)
- aGI.mnNewWidth = nGlyphWidth + (aHbPositions[i + 1].x_offset >> 6);
+ aGI.mnNewWidth = aHbPositions[i].x_advance;
rLayout.AppendGlyph(aGI);