summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-08 23:42:28 +0200
committerAndras Timar <andras.timar@collabora.com>2014-05-09 14:48:52 +0200
commitc4e5b8efd740620fc2fb4335bcf14a49caa01846 (patch)
tree77a906fef3aa0d8f71e487f533420b86fe72c1d2
parent3c80db3ecfc9cbdea8813aa4dc35b47d55adc602 (diff)
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@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/gdi/metric.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 7aad7fbc2013..d708ca297243 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 )