diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2011-11-28 11:51:42 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2011-11-28 11:54:17 +0100 |
commit | d13e9baca52a9e8f07312ee03915bcdeac1ab4cd (patch) | |
tree | c402193fdbfd8e4098c864bc9eb2b4c043feb453 | |
parent | dabe836c6ed66c5740582c17dbc39b2196608e6d (diff) |
Fix Kashida justification when there is no Kashida glyph
-rw-r--r-- | sw/source/core/text/itradj.cxx | 4 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 925bee668ba0..92eb70b653f2 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -164,6 +164,10 @@ bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIte xub_StrLen nKashidasInAttr = rSI.KashidaJustify ( 0, 0, nIdx, nNext - nIdx ); if ( nKashidasInAttr ) { + // Kashida glyph looks suspicious, skip Kashida justification + if ( rInf.GetOut()->GetMinKashida() <= 0 ) + return false; + xub_StrLen nKashidasDropped = 0; if ( !SwScriptInfo::IsArabicText( rInf.GetTxt(), nIdx, nNext - nIdx ) ) { diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index d009d8123bb8..7d14ce8cfc8f 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -1097,7 +1097,6 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const // initialize kashida width // TODO: what if there are different versions of this glyph available - rTo.mnMinKashida = rTo.mnAscent / 4; // a reasonable default const int nKashidaGlyphId = GetRawGlyphIndex( 0x0640 ); if( nKashidaGlyphId ) { |