Lines Matching defs:cluster
353 // Find a cluster range from text range (within one run)
355 // Boolean value in triple indicates whether the cluster range was found or not
369 // Deal with the case when either start or end are not align with glyph cluster edge
409 auto cluster = &fOwner->cluster(correctIndex);
410 visitor(cluster);
414 void Run::addSpacesAtTheEnd(SkScalar space, Cluster* cluster) {
417 // Increment the cluster width
418 cluster->space(space);
440 SkScalar Run::addSpacesEvenly(SkScalar space, Cluster* cluster) {
441 // Offset all the glyphs in the cluster
443 for (size_t i = cluster->startPos(); i < cluster->endPos(); ++i) {
448 if (this->size() == cluster->endPos()) {
450 fPositions[cluster->endPos()].fX += shift;
451 fHalfLetterspacings[cluster->endPos()] = space / PARAM_TWO;
455 // Increment the cluster width
456 cluster->space(shift);
457 cluster->setHalfLetterSpacing(space / PARAM_TWO);
462 SkScalar Run::addSpacesEvenly(SkScalar space, Cluster* cluster) {
463 // Offset all the glyphs in the cluster
465 for (size_t i = cluster->startPos(); i < cluster->endPos(); ++i) {
469 if (this->size() == cluster->endPos()) {
471 fPositions[cluster->endPos()].fX += shift;
475 // Increment the cluster width
476 cluster->space(shift);
477 cluster->setHalfLetterSpacing(space / 2);
483 void Run::shift(const Cluster* cluster, SkScalar offset) {
488 for (size_t i = cluster->startPos(); i < cluster->endPos(); ++i) {
491 if (this->size() == cluster->endPos()) {
493 fPositions[cluster->endPos()].fX += offset;
498 void Run::extendClusterWidth(Cluster* cluster, SkScalar space) {
499 addSpacesAtTheEnd(space, cluster);
500 for (size_t pos = cluster->endPos(); pos < fPositions.size(); pos++) {
591 // We don't have to take in account cluster shift since it's the same for 0 and for pos