Lines Matching refs:i

320     int i, j;  local
328 while( rArgs.GetNextRun( &i, &j, &bHasRTL ) && !bHasRTL )
329 mnGlyphCount += j - i;
335 for( i = 0; i < mnCharCount; ++i )
336 mpGlyphRTLFlags[i] = false;
354 for( i = 0; i < mnCharCount; ++i )
355 mpChars2Glyphs[i] = mpGlyphs2Chars[i] = -1;
360 while( rArgs.GetNextRun( &i, &j, &bIsRTL ) )
365 int nCharPos = bIsRTL ? --j : i++;
390 } while( i < j );
407 for( i = 0; i < mnGlyphCount; ++i )
408 mpOutGlyphs[i] = pBidiStr[ i ];
410 for( i = 0; i < mnGlyphCount; ++i )
413 const WCHAR* pCodes = reinterpret_cast<LPCWSTR>(&pBidiStr[i]);
445 mpGlyphAdvances[ i ] = nGlyphWidth;
449 if( bSurrogate && ((i+1) < mnGlyphCount) )
450 mpGlyphAdvances[ i+1 ] = 0;
457 bool bRTL = mpGlyphRTLFlags ? mpGlyphRTLFlags[i] : false;
458 int nCharPos = mpGlyphs2Chars ? mpGlyphs2Chars[i]: i + rArgs.mnMinCharPos;
469 mpOutGlyphs[i] = DROPPED_OUTGLYPH;
484 mpOutGlyphs[i] = 0;
486 if( bSurrogate && ((i+1) < mnGlyphCount) )
487 mpOutGlyphs[i+1] = DROPPED_OUTGLYPH;
490 mnWidth += mnNotdefWidth - mpGlyphAdvances[i];
491 mpGlyphAdvances[i] = mnNotdefWidth;
493 mpGlyphOrigAdvs[i] = mnNotdefWidth;
506 for( i = 0; i < mnGlyphCount; ++i )
507 mpGlyphOrigAdvs[i] = mpGlyphAdvances[i];
513 for( i = 1; i < nLen; ++i )
518 int nKernAmount = mrWinFontEntry.GetKerning( pBidiStr[i-1], pBidiStr[i] );
519 mpGlyphAdvances[ i-1 ] += nKernAmount;
525 …if( ( (0x3000 == (0xFF00 & pBidiStr[i-1])) || (0x2010 == (0xFFF0 & pBidiStr[i-1])) || (0xFF00 == (…
526 …&& ( (0x3000 == (0xFF00 & pBidiStr[i])) || (0x2010 == (0xFFF0 & pBidiStr[i])) || (0xFF00 == (0xFF…
528 long nKernFirst = +CalcAsianKerning( pBidiStr[i-1], true, bVertical );
529 long nKernNext = -CalcAsianKerning( pBidiStr[i], false, bVertical );
534 nDelta = (nDelta * mpGlyphAdvances[i-1] + 2) / 4;
535 mpGlyphAdvances[i-1] += nDelta;
548 for( i = 0; i < mnCharCount; ++i )
549 mpCharWidths[ i ] = 0;
550 for( i = 0; i < mnGlyphCount; ++i )
552 int j = mpGlyphs2Chars[ i ] - rArgs.mnMinCharPos;
554 mpCharWidths[ j ] += mpGlyphAdvances[ i ];
565 for( i = 0; i < mnCharCount; ++i )
566 mpCharWidths[i] = (int)(mpCharWidths[i] * mfFontScale);
568 for( i = 0; i < mnGlyphCount; ++i )
569 mpGlyphAdvances[i] = (int)(mpGlyphAdvances[i] * mfFontScale);
571 for( i = 0; i < mnGlyphCount; ++i )
572 mpGlyphOrigAdvs[i] = (int)(mpGlyphOrigAdvs[i] * mfFontScale);
590 for( int i = 0; i < nStart; ++i ) local
591 nXOffset += mpGlyphAdvances[ i ];
677 unsigned int i = 0; local
678 for( unsigned int n = 0; n < numGlyphPortions; ++n, i+=maxGlyphCount )
680 mpOutGlyphs+i, maxGlyphCount, mpGlyphAdvances+i );
682 mpOutGlyphs+i, remainingGlyphs, mpGlyphAdvances+i );
701 for( int i = 0; i < mnGlyphCount; ++i ) local
702 mnWidth += mpGlyphAdvances[ i ];
707 for( int i = 0; i < mnCharCount; ++i ) local
708 pDXArray[ i ] = mpCharWidths[ i ];
747 for( int i = 0; i < nMaxIdx; i += 2 ) local
749 pCaretXArray[ i ] = nXPos;
750 nXPos += mpGlyphAdvances[ i>>1 ];
751 pCaretXArray[ i+1 ] = nXPos;
756 int i; local
757 for( i = 0; i < nMaxIdx; ++i )
758 pCaretXArray[ i ] = -1;
761 for( i = 0; i < mnGlyphCount; ++i )
763 int nCurrIdx = mpGlyphs2Chars[ i ] - mnMinCharPos;
766 if( !(mpGlyphRTLFlags && mpGlyphRTLFlags[i]) )
778 nXPos += mpGlyphAdvances[ i ];
802 int nStretchable = 0, i; local
803 for( i = 0; i < nRight; ++i )
804 if( mpGlyphAdvances[i] >= 0 )
809 for( i = 0; (i < nRight) && (nStretchable > 0); ++i )
811 if( mpGlyphAdvances[i] <= 0 )
814 mpGlyphAdvances[i] += nDeltaWidth;
837 int i; local
841 for( i = 0; i < mnGlyphCount; ++i )
842 mpCharWidths[ i ] = mpGlyphAdvances[ i ];
847 for( i = 0; i < mnCharCount; ++i )
848 mpCharWidths[ i ] = 0;
849 for( i = 0; i < mnGlyphCount; ++i )
851 int j = mpGlyphs2Chars[ i ] - rArgs.mnMinCharPos;
853 mpCharWidths[ j ] += mpGlyphAdvances[ i ];
866 int i = 0; local
868 for(; i < mnCharCount; ++i )
870 int j = !mpChars2Glyphs ? i : mpChars2Glyphs[i];
874 int nDiff = nOldWidth - pDXArray[ i ];
884 if( i >= mnCharCount )
890 for( i = 0; i < mnGlyphCount; ++i )
891 mpGlyphOrigAdvs[ i ] = mpGlyphAdvances[ i ];
895 for( i = 0; i < mnCharCount; ++i )
897 int j = !mpChars2Glyphs ? i : mpChars2Glyphs[i];
899 mpGlyphAdvances[j] = pDXArray[i] - mnWidth;
900 mnWidth = pDXArray[i];
914 for( int i = 0; i < nStart; ++i ) local
915 nXPos += mpGlyphAdvances[i];
944 int i = mnGlyphCount; local
945 while( (--i >= 0) && (mpOutGlyphs[ i ] != DROPPED_OUTGLYPH) );
946 if( i < 0 )
963 for( i = mnGlyphCount; --i >= 0; )
965 if( mpOutGlyphs[ i ] != DROPPED_OUTGLYPH )
968 mnWidth -= mpGlyphAdvances[ i ];
969 int nRelCharPos = mpGlyphs2Chars[ i ] - mnMinCharPos;
973 mnGlyphCount = i + 1;
985 for( i = 0; i < mnGlyphCount; ++i )
987 if( mpOutGlyphs[ i ] == DROPPED_OUTGLYPH )
990 int nDroppedWidth = mpGlyphAdvances[ i ];
991 mpGlyphAdvances[ i ] = 0;
998 int nRelCharPos = mpGlyphs2Chars[ i ] - mnMinCharPos;
1004 if( nNewGC != i )
1007 mpOutGlyphs[ nNewGC ] = mpOutGlyphs[ i ];
1008 mpGlyphAdvances[ nNewGC ] = mpGlyphAdvances[ i ];
1009 mpGlyphOrigAdvs[ nNewGC ] = mpGlyphOrigAdvs[ i ];
1010 mpGlyphs2Chars[ nNewGC ] = mpGlyphs2Chars[ i ];
1354 int nItem, i; local
1457 for( int i = rVisualItem.mnMinCharPos; i < rVisualItem.mnEndCharPos; ++i ) local
1458 mpLogClusters[i] = sal::static_int_cast<WORD>(~0U);
1514 for( i = 0; i < nGlyphCount; ++i )
1515 mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 0;
1524 for( i = 0; i < nGlyphCount; ++i )
1525 if( 0 == mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] )
1527 if( i < nGlyphCount )
1540 if( 0 != mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] )
1542 mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = DROPPED_OUTGLYPH;
1551 if( mpLogClusters[ c ] == i )
1555 mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 1;
1566 if( mpLogClusters[ c ] == i )
1570 mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 1;
1576 } while( ++i < nGlyphCount );
1608 if( GetItemSubrange( rVisualItem, i, nEndGlyphPos ) )
1609 for(; i < nEndGlyphPos; ++i )
1610 nXOffset += mpGlyphAdvances[ i ];
1671 for( i = 0; i < mnItemCount; ++i )
1672 mpVisualItems[i].mnXOffset = (int)((double)mpVisualItems[i].mnXOffset*mfFontScale);
1675 for( i = 0; i < mnGlyphCount; ++i )
1677 mpGlyphAdvances[i] = (int)(mpGlyphAdvances[i] * mfFontScale);
1678 mpGlyphOffsets[i].du = (LONG)(mpGlyphOffsets[i].du * mfFontScale);
1679 mpGlyphOffsets[i].dv = (LONG)(mpGlyphOffsets[i].dv * mfFontScale);
1683 for( i = mnSubStringMin; i < nSubStringEnd; ++i )
1684 mpCharWidths[i] = (int)(mpCharWidths[i] * mfFontScale);
1716 int i = mnMinCharPos; local
1717 if( i < rVisualItem.mnMinCharPos )
1718 i = rVisualItem.mnMinCharPos;
1722 for(; i < nCharPosLimit; ++i )
1724 int n = mpLogClusters[ i ] + rVisualItem.mnMinGlyphPos;
1737 for( i = nMaxGlyphPos; ++i < rVisualItem.mnEndGlyphPos; nMaxGlyphPos = i )
1738 if( mpVisualAttrs[i].fClusterStart )
1744 for( i = rMinGlyphPos; --i >= rVisualItem.mnMinGlyphPos; rMinGlyphPos = i )
1745 if( mpVisualAttrs[i].fClusterStart )
1829 for( int i = nMinGlyphPos; i < nStart; ++i ) local
1830 nXOffset += pGlyphWidths[ i ];
1861 for( int i = 0; i < mnGlyphCount; ++i ) local
1862 mpGlyphs2Chars[i] = CHARPOS_NONE;
1875 int i = mpLogClusters[c] + rVI.mnMinGlyphPos; local
1876 mpGlyphs2Chars[i] = c;
1880 for( int i = rVI.mnMinGlyphPos; i < rVI.mnEndGlyphPos; ++i ) { local
1881 if( mpGlyphs2Chars[i] == CHARPOS_NONE )
1882 mpGlyphs2Chars[i] = c;
1884 c = mpGlyphs2Chars[i];
2005 for( int i = mnItemCount; --i >= 0; ++pVI ) local
2014 for( int i = mnItemCount; --i >= 0; ++pVI ) local
2026 int i, nLastUndropped = nMinGlyphPos - 1; local
2027 for( i = nMinGlyphPos; i < nStart; ++i )
2029 if (mpOutGlyphs[i] != DROPPED_OUTGLYPH)
2031 nDelta -= (mpJustifications)? mpJustifications[ i ] : mpGlyphAdvances[ i ];
2032 nLastUndropped = i;
2072 for( int i = mnItemCount, nDummy; --i >= 0; ++pVI ) local
2093 int i; local
2095 for( i = 0; i < mnGlyphCount; ++i )
2096 if( mpOutGlyphs[ i ] == cDroppedGlyph )
2098 if( i >= mnGlyphCount )
2106 for( i = 0; i < mnGlyphCount; ++i )
2107 mpGlyphs2Chars[ i ] = -1;
2114 for( i = rVI.mnEndCharPos; --i >= rVI.mnMinCharPos; )
2116 int j = mpLogClusters[ i ] + rVI.mnMinGlyphPos;
2117 mpGlyphs2Chars[ j ] = i;
2131 for( i = rVI.mnMinCharPos; i < rVI.mnEndCharPos; ++i )
2133 int j = mpLogClusters[ i ] + rVI.mnMinGlyphPos;
2135 mpCharWidths[ i ] = 0;
2141 i = nMinGlyphPos;
2142 while( (mpOutGlyphs[i] == cDroppedGlyph) && (i < nEndGlyphPos) )
2145 rVI.mnMinGlyphPos = ++i;
2149 if( i >= nEndGlyphPos )
2161 for (i = nOrigMinGlyphPos; i < nMinGlyphPos; i++)
2162 mpOutGlyphs[ i ] = cDroppedGlyph;
2163 rVI.mnMinGlyphPos = i = nOrigMinGlyphPos;
2167 for(; i < nEndGlyphPos; ++i )
2168 if( mpOutGlyphs[ i ] == cDroppedGlyph )
2170 int j = i;
2171 while( ++i < nEndGlyphPos )
2173 if( mpOutGlyphs[ i ] == cDroppedGlyph )
2175 mpOutGlyphs[ j ] = mpOutGlyphs[ i ];
2176 mpGlyphOffsets[ j ] = mpGlyphOffsets[ i ];
2177 mpVisualAttrs[ j ] = mpVisualAttrs[ i ];
2178 mpGlyphAdvances[ j ] = mpGlyphAdvances[ i ];
2180 mpJustifications[ j ] = mpJustifications[ i ];
2181 const int k = mpGlyphs2Chars[ i ];
2224 int i = mnMinCharPos; local
2225 while( (--i >= rVisualItem.mnMinCharPos)
2226 && (nBaseGlyphPos == mpLogClusters[i]) )
2227 nBaseClusterOffset += mpCharWidths[i];
2269 for( int i = nMinGlyphPos; i < nEndGlyphPos; ++i ) local
2270 nWidth += pGlyphWidths[i];
2276 for( int i = mnMinCharPos; i < mnEndCharPos; ++i ) local
2277 pDXArray[ i - mnMinCharPos ] = mpCharWidths[ i ];
2287 for( int i = mnMinCharPos; i < mnEndCharPos; ++i ) local
2289 nWidth += mpCharWidths[ i ] * nFactor;
2302 if( (i >= rVisualItem.mnMinCharPos)
2303 && (i < rVisualItem.mnEndCharPos) )
2309 int nGlyphPos = mpLogClusters[i] + nMinGlyphIndex;
2311 return i;
2312 } while( --i >= mnMinCharPos );
2331 int i; local
2332 for( i = 0; i < nMaxIdx; ++i )
2333 pCaretXArray[ i ] = -1;
2335 for( i = 0; i <= mnGlyphCount; ++i )
2336 pGlyphPos[ i ] = -1;
2351 for( i = rVisualItem.mnMinGlyphPos; i < rVisualItem.mnEndGlyphPos; ++i )
2353 pGlyphPos[ i ] = nXPos;
2354 nXPos += mpGlyphAdvances[ i ];
2357 pGlyphPos[ i ] = nXPos;
2360 i = rVisualItem.mnMinCharPos;
2361 if( i < mnMinCharPos )
2362 i = mnMinCharPos;
2363 for(; (i < rVisualItem.mnEndCharPos) && (i < mnEndCharPos); ++i )
2365 int j = mpLogClusters[ i ] + rVisualItem.mnMinGlyphPos;
2366 int nCurrIdx = i * 2;
2386 for( i = 0; i < nMaxIdx; ++i )
2388 if( pCaretXArray[ i ] >= 0 )
2389 nXPos = pCaretXArray[ i ];
2391 pCaretXArray[ i ] = nXPos;
2419 int i,j; local
2420 for( i = mnMinCharPos, j = 0; i < mnEndCharPos; ++i, ++j )
2424 if( mpCharWidths[i] != nNewCharWidth )
2426 mpCharWidths[i] = nNewCharWidth;
2437 for( i = 0; i < mnGlyphCount; ++i )
2438 mpJustifications[ i ] = mpGlyphAdvances[ i ];
2452 for (i = rVisualItem.mnMinCharPos; i < rVisualItem.mnEndCharPos; i++)
2453 nXOffset += mpCharWidths[i];
2465 for( i = rVisualItem.mnMinGlyphPos; i < rVisualItem.mnEndGlyphPos; ++i )
2466 … if ( (1U << mpVisualAttrs[i].uJustification) & 0xFF82 ) // any Arabic justification
2476 for( i = rVisualItem.mnMinGlyphPos; i < rVisualItem.mnEndGlyphPos; ++i )
2480 if ( mpVisualAttrs[i].uJustification == SCRIPT_JUSTIFY_NONE )
2490 mpVisualAttrs[i].uJustification = SCRIPT_JUSTIFY_ARABIC_KASHIDA;
2519 for( i = nMinGlyphPos; i < nEndGlyphPos; ++i )
2520 nXOffset += mpJustifications[ i ];
2531 for( i = nMinGlyphPos; i < nEndGlyphPos; ++i )
2533 const int nXOffsetAdjust = mpJustifications[i] - mpGlyphAdvances[i];
2535 int nIdxAdd = i - 1;
2542 mpJustifications[i] -= nXOffsetAdjust;
2565 for( int i = nMinGlyphPos; i < nEndGlyphPos; ++i ) local
2568 if( (i > nMinGlyphPos && !mpGlyphAdvances[ i-1 ])
2569 && (1U << mpVisualAttrs[i].uJustification) & 0xFF83 ) // all Arabic justifiction types
2573 long nSpaceAdded = mpJustifications[ i ] - mpGlyphAdvances[ i ];
2574 mpJustifications [ i ] = mpGlyphAdvances [ i ];
2575 mpJustifications [ i - 1 ] += nSpaceAdded;
2580 for( int i = nMinGlyphPos; i < nEndGlyphPos; ) local
2581 KashidaWordFix ( nMinGlyphPos, nEndGlyphPos, &i );
2592 for( int i = nMaxPos; i < nEndGlyphPos; ++i ) local
2594 if( (mpVisualAttrs[ i ].uJustification >= SCRIPT_JUSTIFY_ARABIC_BLANK)
2595 && (mpVisualAttrs[ i ].uJustification < SCRIPT_JUSTIFY_ARABIC_NORMAL) )
2597 nMaxPos = i;
2606 for( int i = nMaxPos; i >= nMinPos; --i ) local
2608 long nSpaceAdded = mpJustifications[ i ] - mpGlyphAdvances[ i ];
2611 nKashPos = i;
2624 for( int i = nMinPos; i <= nMaxPos; ++i ) local
2626 if( i == nKashPos )
2629 long nSpaceAdded = mpJustifications[ i ] - mpGlyphAdvances[ i ];
2632 mpJustifications[ i ] -= nSpaceAdded;
2645 for( int i = nMinPos; i <= nMaxPos; ++i ) local
2647 if( i == nKashPos )
2652 mpJustifications [ i ] -= nSteal;
2697 int i; local
2698 for( i = mnMinCharPos; i < mnEndCharPos; ++i )
2699 nOldWidth += mpCharWidths[ i ];
2711 for( i = 0; i < mnGlyphCapacity; ++i )
2712 mpJustifications[ i ] = mpGlyphAdvances[ i ];
2727 for( i = rVisualItem.mnMinCharPos; i < rVisualItem.mnEndCharPos; ++i )
2728 nItemWidth += mpCharWidths[ i ];