Do Arabic shaping earlier before measuring the text so that it gets laid out correctly. Bugs 117041, 138097. r=ftang, sr=waterson

This commit is contained in:
smontagu%netscape.com 2007-06-28 20:02:59 +00:00
Родитель 0ebbbdc7e4
Коммит 86480f56b7
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -256,7 +256,7 @@ nsresult ArabicShaping(const PRUnichar* aString, PRUint32 aLen,
PRBool aInputLogical, PRBool aOutputLogical)
{
nsAutoString tempString(aString);
PRUnichar *tempBuf = (PRUnichar*)tempString.get();
PRUnichar *tempBuf = NS_CONST_CAST(PRUnichar*, tempString.get());
if (aInputLogical) {
ReverseString(tempBuf, aLen);
}
@ -318,7 +318,8 @@ nsresult ArabicShaping(const PRUnichar* aString, PRUint32 aLen,
for(i=0;i<8;i++) {
if(key == gArabicLigatureMap[i]) {
done = PR_TRUE;
*lDest++ = 0x200B;//ZERO WIDTH SPACE
// lam and alef in the source are mapped to a lam-alef ligature in the
// destination, so lSrc is incremented by 2 here
*lDest++ = 0xFEF5 + i;
lSrc+=2;
break;