diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-27 17:40:22 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-28 09:04:36 +0200 |
commit | 24534b101c713a04c9ab12570d9124037643e644 (patch) | |
tree | 22e2daf1c3e1b6d08dd1d0b55ee08e73f7afea79 /vcl | |
parent | eada4adee8a32be021ee3031d07e0ccda7217e0d (diff) |
tdf#119451 vcl layout cache: fix glyph fallback handling
Type ":dog:" into Writer with e.g. the Liberation Serif font, glyph
layout doesn't execute, a literal 0 glyph id is rendered.
Fix the problem by returning the glyph items (to be inserted into a
cache) after handling glyph fallback.
Change-Id: I928b0087de309dbe04936c6e7732d79bec541596
Reviewed-on: https://gerrit.libreoffice.org/59665
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/text.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 9568b3b50eb2..5112814a35ec 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1332,14 +1332,16 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr, if( !pSalLayout ) return nullptr; - if (flags & SalLayoutFlags::GlyphItemsOnly) - return pSalLayout; - // do glyph fallback if needed // #105768# avoid fallback for very small font sizes if (aLayoutArgs.NeedFallback() && mpFontInstance->GetFontSelectPattern().mnHeight >= 3) pSalLayout = ImplGlyphFallbackLayout(std::move(pSalLayout), aLayoutArgs); + if (flags & SalLayoutFlags::GlyphItemsOnly) + // Return glyph items only after fallback handling. Otherwise they may + // contain invalid glyph IDs. + return pSalLayout; + // position, justify, etc. the layout pSalLayout->AdjustLayout( aLayoutArgs ); pSalLayout->DrawBase() = ImplLogicToDevicePixel( rLogicalPos ); |