vcl/source/gdi/impglyphitem.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit f4d51b6fc1f4e0457efc0d513bd74c64d5697938
Author:     Luboš Luňák <[email protected]>
AuthorDate: Thu Apr 28 12:02:29 2022 +0200
Commit:     Luboš Luňák <[email protected]>
CommitDate: Thu Apr 28 14:34:33 2022 +0200

    use the same TextLayoutCache for the verifying call
    
    Apparently not using it makes the ImplLayout() call treat everything
    as one run, which changes whether a glyph may get ALLOW_KASHIDA.
    
    Change-Id: I1a951dbc4242d1fe8e4ee5074d9f9ad1d80480be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133546
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <[email protected]>

diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index bffa490065c6..6f0c3f3db5fd 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -302,6 +302,12 @@ SalLayoutGlyphsCache::GetLayoutGlyphs(VclPtr<const 
OutputDevice> outputDevice, c
             {
                 mLastTemporaryKey = std::move(key);
 #ifdef DBG_UTIL
+                std::shared_ptr<const vcl::text::TextLayoutCache> 
tmpLayoutCache;
+                if (layoutCache == nullptr)
+                {
+                    tmpLayoutCache = vcl::text::TextLayoutCache::Create(text);
+                    layoutCache = tmpLayoutCache.get();
+                }
                 // Check if the subset result really matches what we would get 
normally,
                 // to make sure corner cases are handled well (see 
SalLayoutGlyphsImpl::cloneCharRange()).
                 std::unique_ptr<SalLayout> layout

Reply via email to