[Libreoffice-commits] .: sw/source vcl/generic

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Nov 28 02:54:45 PST 2011


 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 <khaledhosny at 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 )
     {


More information about the Libreoffice-commits mailing list