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:47:30 +0100
commitade3f2e4a1a22b5ab412c220db223c996473d7ef (patch)
tree478c120b1d08be7954cf729d3eb7fd28c9eb6d64 /vcl/generic
parentabc4d0c705095582cb4a983180e73faef0d913c8 (diff)
Resolves: tdf#89231 if no font has 0x202F fallback to a normal space
Change-Id: I2325c0b09ccf66ee15597251ad027b295de5502f (cherry picked from commit f76ecc3e9ce51b35fc18db55b808270079a3652b)
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 bc65eafc8c89..7bab5fe0d9f0 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)
{