Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1662

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/62/1662/1

resolves:fdo#54629 vcl:gdi add recursive check

check all font fallback levels if rRect.IsEmpty() is true for
specific level.

Change-Id: I8eebde2196d6551ddcf9d020afa3a157c809710c
---
M vcl/unx/generic/gdi/salgdi3.cxx
1 file changed, 16 insertions(+), 4 deletions(-)



diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index fb7027e..e0924f8 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -687,14 +687,15 @@
 
 sal_Bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
 {
+    static int i = -1;
     int nLevel = nGlyphIndex >> GF_FONTSHIFT;
-    if( nLevel >= MAX_FALLBACK )
-        return sal_False;
 
     ServerFont* pSF = mpServerFont[ nLevel ];
     if( !pSF )
+    {
+        i = -1;
         return sal_False;
-
+    }
     nGlyphIndex &= GF_IDXMASK;
     const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
     Rectangle aRect( rGM.GetOffset(), rGM.GetSize() );
@@ -712,7 +713,18 @@
     else
         rRect = aRect;
 
-    return sal_True;
+    if ( rRect.IsEmpty() )
+    {
+        i++;
+        sal_GlyphId nFontTag = i << GF_FONTSHIFT;
+// Check all fallback font levels, start from level zero
+        GetGlyphBoundRect( nGlyphIndex | nFontTag, rRect );
+    }
+    else
+    {
+        i = -1;
+        return sal_True;
+    }
 }
 
 // ---------------------------------------------------------------------------

-- 
To view, visit https://gerrit.libreoffice.org/1662
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eebde2196d6551ddcf9d020afa3a157c809710c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: navin patidar <patidar@kacst.edu.sa>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.