sw/source/core/text/itradj.cxx | 4 ++++ vcl/generic/glyphs/gcach_ftyp.cxx | 1 - 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit d13e9baca52a9e8f07312ee03915bcdeac1ab4cd Author: Khaled Hosny <khaledho...@eglug.org> Date: Mon Nov 28 11:51:42 2011 +0100 Fix Kashida justification when there is no Kashida glyph diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 925bee6..92eb70b 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 d009d81..7d14ce8 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 ) { _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits