summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-06 09:35:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-06 09:38:00 +0000
commit9adfadfe380f83af8c7ff5358d2027f0babc504d (patch)
tree9537ccdc71321fa4ec570cde2bdcff4c0d07685c /vcl
parentd9061db785a096269fb026bd9cc1e67381d3bf4d (diff)
Resolves: fdo#57939 use different layout instances for differing kerning flags
use different layout engine instances for different kerning+ligature combinations Change-Id: I951dec2dfdd25df2c60f617e70a094bd0753aa77 (cherry picked from commit 2f80337e5eccbb7c57493eddd1d4e62de0fb1276) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index f5bc98a0b2d9..a8ddc4965b60 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -266,6 +266,7 @@ private:
IcuFontFromServerFont maIcuFont;
le_int32 meScriptCode;
+ le_int32 mnLayoutFlags;
LayoutEngine* mpIcuLE;
public:
@@ -280,6 +281,7 @@ public:
IcuLayoutEngine::IcuLayoutEngine( ServerFont& rServerFont )
: maIcuFont( rServerFont ),
meScriptCode( USCRIPT_INVALID_CODE ),
+ mnLayoutFlags( 0 ),
mpIcuLE( NULL )
{}
@@ -367,13 +369,14 @@ bool IcuLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
if( eScriptCode < 0 ) // TODO: handle errors better
eScriptCode = latnScriptCode;
- // get layout engine matching to this script
+ // get layout engine matching to this script and ligature/kerning combination
// no engine change necessary if script is latin
- if( !mpIcuLE || ((eScriptCode != meScriptCode) && (eScriptCode > USCRIPT_INHERITED)) )
+ if( !mpIcuLE || ((eScriptCode != meScriptCode) && (eScriptCode > USCRIPT_INHERITED)) || (mnLayoutFlags != nLayoutFlags) )
{
// TODO: cache multiple layout engines when multiple scripts are used
delete mpIcuLE;
meScriptCode = eScriptCode;
+ mnLayoutFlags = nLayoutFlags;
le_int32 eLangCode = 0; // TODO: get better value
mpIcuLE = LayoutEngine::layoutEngineFactory( &maIcuFont, eScriptCode, eLangCode, nLayoutFlags, rcIcu );
if( LE_FAILURE(rcIcu) )