зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
0ebbbdc7e4
Коммит
86480f56b7
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче