diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-05-05 21:10:52 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-05-05 21:16:31 +0200 |
commit | 784cd10c31e4378e5b9d03791154e01d23867120 (patch) | |
tree | c49afc0d59a29698e0ff2430921d91bdbb8957d8 /vcl/generic/glyphs/gcach_layout.cxx | |
parent | 919f853278c3187e30484c8e542beb92b3165e2b (diff) |
[harfbuzz] Fix vertical text layout
"Fixed" in the sense that it works exactly like the non-HarfBuzz case,
but that is already a bit broken. Need to get rid if the little OpenType
layout engine in ServerFont::ApplyGSUB() and use HarfBuzz's vertical
text layout capabilities.
Change-Id: I32abe385575bd5d1b66e573dfe2fc7f412d02254
Diffstat (limited to 'vcl/generic/glyphs/gcach_layout.cxx')
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index fab66ac23920..f7b69073c858 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -501,6 +501,15 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) continue; } + // apply vertical flags and glyph substitution + // XXX: Use HB_DIRECTION_TTB above and apply whatever flags magic + // FixupGlyphIndex() is doing, minus the GSUB part. + if (nCharPos >= 0) + { + sal_UCS4 aChar = rArgs.mpStr[nCharPos]; + nGlyphIndex = rFont.FixupGlyphIndex(nGlyphIndex, aChar); + } + bool bInCluster = false; if (i > 0 && pHbGlyphInfos[i].cluster == pHbGlyphInfos[i - 1].cluster) bInCluster = true; |