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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 28 07:04:58 UTC 2018


 vcl/source/outdev/text.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 24534b101c713a04c9ab12570d9124037643e644
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Aug 27 17:40:22 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Tue Aug 28 09:04:36 2018 +0200

    tdf#119451 vcl layout cache: fix glyph fallback handling
    
    Type ":dog:" into Writer with e.g. the Liberation Serif font, glyph
    layout doesn't execute, a literal 0 glyph id is rendered.
    
    Fix the problem by returning the glyph items (to be inserted into a
    cache) after handling glyph fallback.
    
    Change-Id: I928b0087de309dbe04936c6e7732d79bec541596
    Reviewed-on: https://gerrit.libreoffice.org/59665
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9568b3b50eb2..5112814a35ec 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1332,14 +1332,16 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
     if( !pSalLayout )
         return nullptr;
 
-    if (flags & SalLayoutFlags::GlyphItemsOnly)
-        return pSalLayout;
-
     // do glyph fallback if needed
     // #105768# avoid fallback for very small font sizes
     if (aLayoutArgs.NeedFallback() && mpFontInstance->GetFontSelectPattern().mnHeight >= 3)
         pSalLayout = ImplGlyphFallbackLayout(std::move(pSalLayout), aLayoutArgs);
 
+    if (flags & SalLayoutFlags::GlyphItemsOnly)
+        // Return glyph items only after fallback handling. Otherwise they may
+        // contain invalid glyph IDs.
+        return pSalLayout;
+
     // position, justify, etc. the layout
     pSalLayout->AdjustLayout( aLayoutArgs );
     pSalLayout->DrawBase() = ImplLogicToDevicePixel( rLogicalPos );


More information about the Libreoffice-commits mailing list