[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/source

Stephan Bergmann sbergman at redhat.com
Fri May 9 03:07:24 PDT 2014


 vcl/source/gdi/metric.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9df14a8df187d8e0735da6eea87d199e7d11419a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 8 23:42:28 2014 +0200

    Fix "symbol aliasing" code
    
    (cherry picked from commit 434c5d7845ab25f8a518e7bec910f8628725d5b9)
    Conflicts:
    	vcl/source/gdi/impfont.cxx
    
    Change-Id: Ic4605c40b9f3467f84732a0e3c956976fae68277
    Reviewed-on: https://gerrit.libreoffice.org/9285
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 7aad7fb..d708ca2 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -364,12 +364,15 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
     // check that we are inside any range
     if( (nRange == 0) && (cChar < mpRangeCodes[0]) ) {
         // symbol aliasing gives symbol fonts a second chance
-        const bool bSymbolic = (mpRangeCodes[0]>=0xF000) & (mpRangeCodes[1]<=0xF0FF);
+        const bool bSymbolic = cChar <= 0xFF && (mpRangeCodes[0]>=0xF000) & (mpRangeCodes[1]<=0xF0FF);
         if( !bSymbolic )
             return 0;
         // check for symbol aliasing (U+00xx <-> U+F0xx)
         cChar |= 0xF000;
         nRange = ImplFindRangeIndex( cChar );
+        if( (nRange == 0) && (cChar < mpRangeCodes[0]) ) {
+            return 0;
+        }
     }
     // check that we are inside a range
     if( (nRange & 1) != 0 )


More information about the Libreoffice-commits mailing list