diff options
author | Herbert Duerr <hdu@openoffice.org> | 2002-09-25 16:46:50 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2002-09-25 16:46:50 +0000 |
commit | 7304604e51ef0d857bde8016c4948775a7876312 (patch) | |
tree | 99c81d195ac93ea5afb9bafc7eb79bac2cf7c308 /vcl/source/glyphs | |
parent | 9e6104ea9376ae69299c1d11a1ef67ddaa679752 (diff) |
#102258# kashida justification on UNX
Diffstat (limited to 'vcl/source/glyphs')
-rwxr-xr-x | vcl/source/glyphs/gcach_layout.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx index 5876c6615f4f..7f1619e8f93a 100755 --- a/vcl/source/glyphs/gcach_layout.cxx +++ b/vcl/source/glyphs/gcach_layout.cxx @@ -2,8 +2,8 @@ * * $RCSfile: gcach_layout.cxx,v $ * - * $Revision: 1.16 $ - * last change: $Author: hdu $ $Date: 2002-09-25 13:27:36 $ + * $Revision: 1.17 $ + * last change: $Author: hdu $ $Date: 2002-09-25 17:46:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -564,8 +564,8 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, if( pLineBidi ) { // TODO: reorder chars, layout at once, reorder charpos - nMinBidiPos = rArgs.mnMinCharPos; bRightToLeft = (UBIDI_RTL == ubidi_getVisualRun( pLineBidi, i, &nMinBidiPos, &nEndBidiPos )); + nMinBidiPos += rArgs.mnMinCharPos; nEndBidiPos += nMinBidiPos; } @@ -642,11 +642,26 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, rLayout.SetGlyphItems( pGlyphItems, nSumGlyphCount ); rLayout.SetWantFallback( bWantFallback ); + // general justification if( rArgs.mpDXArray ) rLayout.ApplyDXArray( rArgs.mpDXArray ); else if( rArgs.mnLayoutWidth ) rLayout.Justify( rArgs.mnLayoutWidth ); + // kashida justification + if( (rArgs.mpDXArray || rArgs.mnLayoutWidth) + && ((meScriptCode == arabScriptCode) || (meScriptCode == syrcScriptCode)) ) + { + LEGlyphID nKashidaIndex = maIcuFont.mapCharToGlyph( 0x0640, NULL ); + if( nKashidaIndex != 0 ) + { + LEPoint aAdvance; + maIcuFont.getGlyphAdvance( nKashidaIndex, aAdvance ); + rLayout.KashidaJustify( nKashidaIndex, (long)aAdvance.fX ); + // TODO: kashida-GSUB/GPOS + } + } + return true; } |