summaryrefslogtreecommitdiff
path: root/vcl/generic/glyphs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-17 10:40:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-17 10:46:28 +0100
commit01cadc8fdbc9eab94833566263e6bd0acb313c3c (patch)
treef024c59a6c65f708f12b8f7296de287aade4397f /vcl/generic/glyphs
parentd5e15c6355e5bbf9ca87545f9ffb2f81b85d6d8d (diff)
Related: rhbz#857860 enable ligatures and kerning only when requested
Change-Id: I8c4d9744c9a8704fbb7de5670933f2229f710fce
Diffstat (limited to 'vcl/generic/glyphs')
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 774f0f8d56c4..ab008b20fba5 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -311,6 +311,12 @@ static bool lcl_CharIsJoiner(sal_Unicode cChar)
bool IcuLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
{
+ le_int32 nLayoutFlags = 0;
+ if (rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS)
+ nLayoutFlags |= LayoutEngine::kTypoFlagKern;
+ if (rArgs.mnFlags & SAL_LAYOUT_ENABLE_LIGATURES)
+ nLayoutFlags |= LayoutEngine::kTypoFlagLiga;
+
LEUnicode* pIcuChars;
if( sizeof(LEUnicode) == sizeof(*rArgs.mpStr) )
pIcuChars = (LEUnicode*)rArgs.mpStr;
@@ -371,7 +377,7 @@ bool IcuLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
delete mpIcuLE;
meScriptCode = eScriptCode;
le_int32 eLangCode = 0; // TODO: get better value
- mpIcuLE = LayoutEngine::layoutEngineFactory( &maIcuFont, eScriptCode, eLangCode, rcIcu );
+ mpIcuLE = LayoutEngine::layoutEngineFactory( &maIcuFont, eScriptCode, eLangCode, nLayoutFlags, rcIcu );
if( LE_FAILURE(rcIcu) )
{
delete mpIcuLE;