vcl/generic/glyphs/gcach_layout.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 8e43f5d3222ca320e28026bfef4b6096376446c1 Author: Khaled Hosny <[email protected]> Date: Sat Aug 1 21:23:43 2015 +0200 Move fix for tdf#89231 to a better place The Unicode to glyph id callback function is the natural and simpler place for that kind of check. Change-Id: I0e9fa131dcffa5063277f029e391eede7417c72b diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index 43550f2..f9dd96d 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -148,6 +148,10 @@ static hb_bool_t getFontGlyph(hb_font_t* /*font*/, void* pFontData, ServerFont* pFont = static_cast<ServerFont*>(pFontData); *nGlyphIndex = pFont->GetRawGlyphIndex(ch, vs); + // tdf#89231 if the font is missing non-breaking space, then use a normal space + if (*nGlyphIndex == 0 && ch == 0x202F && !vs) + *nGlyphIndex = pFont->GetRawGlyphIndex(' '); + return *nGlyphIndex != 0; } @@ -488,12 +492,6 @@ 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) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
