[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann
sbergman at redhat.com
Thu May 8 14:43:05 PDT 2014
vcl/source/gdi/impfont.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 434c5d7845ab25f8a518e7bec910f8628725d5b9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu May 8 23:42:28 2014 +0200
Fix "symbol aliasing" code
Change-Id: Ic4605c40b9f3467f84732a0e3c956976fae68277
diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx
index 31d7968..eb5a0c0 100644
--- a/vcl/source/gdi/impfont.cxx
+++ b/vcl/source/gdi/impfont.cxx
@@ -152,11 +152,15 @@ int ImplFontCharMap::GetGlyphIndex( sal_UCS4 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+F0xx -> U+00xx)
- nRange = ImplFindRangeIndex( cChar | 0xF000 );
+ 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