summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-26 15:45:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-26 15:46:02 +0100
commitf76ecc3e9ce51b35fc18db55b808270079a3652b (patch)
tree4c17fe1216785465789ed893e938deaae8eb720d /vcl/generic
parent85fae98f01250a6e9d75e841e0de410f8ea8a333 (diff)
Resolves: tdf#89231 if no font has 0x202F fallback to a normal space
Change-Id: I2325c0b09ccf66ee15597251ad027b295de5502f
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 0eecae558a44..8d1c6f543d01 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -488,6 +488,12 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
int32_t nGlyphIndex = pHbGlyphInfos[i].codepoint;
int32_t nCharPos = pHbGlyphInfos[i].cluster;
+ // tdf#89231 if it's just a missing non-breaking space, then use a normal space
+ if (!nGlyphIndex && (SalLayoutFlags::ForFallback & rArgs.mnFlags) && nCharPos >= 0 && rArgs.mpStr[nCharPos] == 0x202F)
+ {
+ nGlyphIndex = rFont.GetGlyphIndex(' ');
+ }
+
// if needed request glyph fallback by updating LayoutArgs
if (!nGlyphIndex)
{