Index: gr_UnixPangoGraphics.cpp =================================================================== RCS file: /cvsroot/abi/src/af/gr/unix/gr_UnixPangoGraphics.cpp,v retrieving revision 1.31 diff -u -r1.31 gr_UnixPangoGraphics.cpp --- gr_UnixPangoGraphics.cpp 2 Feb 2006 02:50:51 -0000 1.31 +++ gr_UnixPangoGraphics.cpp 22 Feb 2006 21:02:47 -0000 @@ -456,14 +456,12 @@ RI->m_pLogOffsets = new int [RI->m_pGlyphs->num_glyphs]; const char * p = utf8.utf8_str(); - + UT_UTF8Stringbuf::UTF8Iterator I = utf8.getIterator(); + int j = 0; + for(int i = 0; i < RI->m_pGlyphs->num_glyphs; ++i) { - // there is no way to reset the iterator, so we have to - // create it afresh on each iteration - UT_UTF8Stringbuf::UTF8Iterator I = utf8.getIterator(); - int j = 0; int iOff = RI->m_pGlyphs->log_clusters[i]; // advance the iterator until we find the offset that corresponds to the glyph @@ -476,17 +474,6 @@ RI->m_pLogOffsets[i] = j; - // set also any subsequent glyphs that have the same byte offset (to save - // ourselves the overhead of iterating the utf8 string againg) - int k = i+1; - while(k < RI->m_pGlyphs->num_glyphs && RI->m_pGlyphs->log_clusters[k] == iOff) - { - RI->m_pLogOffsets[k] = j; - ++k; - } - - // jump ahead as appropriate - i = k - 1; } // need to transfer data that we will need later from si to RI