summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/itradj.cxx4
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx1
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 )
{