Lines Matching refs:item

354 static HB_Bool khmer_shape_syllable(HB_Bool openType, HB_ShaperItem *item)
356 /* KHDEBUG("syllable from %d len %d, str='%s'", item->from, item->length,
357 item->string->mid(item->from, item->length).toUtf8().data()); */
360 int syllableEnd = item->item.pos + item->item.length;
370 const int availableGlyphs = item->num_glyphs;
377 assert(item->item.length < 13);
394 for (i = item->item.pos; i < syllableEnd; i += 1) {
395 KhmerCharClass charClass = getKhmerCharClass(item->string[i]);
407 reordered[len] = item->string[i];
417 ( (getKhmerCharClass(item->string[i+1]) & CF_CLASS_MASK) == CC_CONSONANT2) ) {
437 if (getKhmerCharClass(item->string[item->item.pos]) & CF_DOTTED_CIRCLE) {
444 for (i = item->item.pos; i < syllableEnd; i += 1) {
445 HB_UChar16 uc = item->string[i];
483 unsigned char property = (getKhmerCharClass(item->string[i+1]) & CF_CLASS_MASK) == CC_CONSONANT3 ?
489 reordered[len] = item->string[i];
501 if (getKhmerCharClass(item->string[i+1]) & CF_ABOVE_VOWEL ) {
508 (item->string[i+1] == C_VOWEL_AA) &&
509 (item->string[i+2] == C_SIGN_NIKAHIT) )
516 if (i + 3 < syllableEnd && (getKhmerCharClass(item->string[i+3]) & CF_ABOVE_VOWEL) ) {
523 (item->string[i+3] == C_VOWEL_AA) &&
524 (item->string[i+4] == C_SIGN_NIKAHIT) )
540 if (!item->font->klass->convertStringToGlyphIndices(item->font,
542 item->glyphs, &item->num_glyphs,
543 item->item.bidiLevel % 2))
549 item->attributes[i].mark = FALSE;
550 item->attributes[i].clusterStart = FALSE;
551 item->attributes[i].justification = 0;
552 item->attributes[i].zeroWidth = FALSE;
578 HB_OpenTypeShape(item, where);
579 if (!HB_OpenTypePosition(item, availableGlyphs, /*doLogClusters*/FALSE))
585 HB_HeuristicPosition(item);
588 item->attributes[0].clusterStart = TRUE;
592 HB_Bool HB_KhmerShape(HB_ShaperItem *item)
595 unsigned short *logClusters = item->log_clusters;
598 HB_ShaperItem syllable = *item;
601 int sstart = item->item.pos;
602 int end = sstart + item->item.length;
604 assert(item->item.script == HB_Script_Khmer);
607 openType = HB_SelectScript(item, khmer_features);
610 KHDEBUG("khmer_shape: from %d length %d", item->item.pos, item->item.length);
613 int send = khmer_nextSyllableBoundary(item->string, sstart, end, &invalid);
616 syllable.item.pos = sstart;
617 syllable.item.length = send-sstart;
618 syllable.glyphs = item->glyphs + first_glyph;
619 syllable.attributes = item->attributes + first_glyph;
620 syllable.offsets = item->offsets + first_glyph;
621 syllable.advances = item->advances + first_glyph;
622 syllable.num_glyphs = item->num_glyphs - first_glyph;
625 item->num_glyphs += syllable.num_glyphs;
631 KHDEBUG(" %d -> glyph %x", i, item->glyphs[i]);
635 logClusters[i-item->item.pos] = first_glyph;
640 item->num_glyphs = first_glyph;