summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-08 23:42:28 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-05-09 10:06:49 +0000
commit9df14a8df187d8e0735da6eea87d199e7d11419a (patch)
tree4e54f3ff7124e15ed2fe1fdefa0c0405518735e6 /vcl/source
parent948728a4159a8ba74ecc663373d31f1840fed9ac (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>
Diffstat (limited to 'vcl/source')
-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 )