[Libreoffice-commits] core.git: vcl/generic

Khaled Hosny khaledhosny at eglug.org
Sun May 5 12:24:10 PDT 2013


 vcl/generic/glyphs/gcach_layout.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 784cd10c31e4378e5b9d03791154e01d23867120
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Sun May 5 21:10:52 2013 +0200

    [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

diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index fab66ac..f7b6907 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;


More information about the Libreoffice-commits mailing list