private void drawTextWithGlyphs(
      DocumentData documentData, Matrix parentMatrix, Font font, Canvas canvas, int parentAlpha) {
    float textSize;
    if (textSizeCallbackAnimation != null) {
      textSize = textSizeCallbackAnimation.getValue();
    } else {
      textSize = documentData.size;
    }
    float fontScale = textSize / 100f;
    float parentScale = Utils.getScale(parentMatrix);

    String text = documentData.text;

    // Split full text in multiple lines
    List<String> textLines = getTextLines(text);
    int textLineCount = textLines.size();
    // Add tracking
    float tracking = documentData.tracking / 10f;
    if (trackingCallbackAnimation != null) {
      tracking += trackingCallbackAnimation.getValue();
    } else if (trackingAnimation != null) {
      tracking += trackingAnimation.getValue();
    }
    int lineIndex = -1;
    for (int i = 0; i < textLineCount; i++) {
      String textLine = textLines.get(i);
      float boxWidth = documentData.boxSize == null ? 0f : documentData.boxSize.x;
      List<TextSubLine> lines = splitGlyphTextIntoLines(textLine, boxWidth, font, fontScale, tracking, true);
      for (int j = 0; j < lines.size(); j++) {
        TextSubLine line = lines.get(j);
        lineIndex++;

        canvas.save();

        if (offsetCanvas(canvas, documentData, lineIndex, line.width)) {
          drawGlyphTextLine(line.text, documentData, font, canvas, parentScale, fontScale, tracking, parentAlpha);
        }

        canvas.restore();
      }
    }
  }
Configures the [fillPaint] and [strokePaint] used for drawing based on currently active text ranges.

@param parentAlpha A value from 0 to 255 indicating the alpha of the parented layer.
lottie/src/main/java/com/airbnb/lottie/model/layer/TextLayer.java