def METHOD_NAME(self, glyphs, path, stretch_space, space_indices, text_y):
    text_scale = Transform(f'scale({self.settings["scale"] / 100})')
    distance = 0
    old_bbox = None
    i = 0
    for glyph in glyphs:
        # dimensions
        bbox = glyph.bounding_box()
        transformed_bbox = glyph.bounding_box(glyph.getparent().composed_transform())
        left = bbox.left
        transformed_left = transformed_bbox.left
        width = convert_unit(transformed_bbox.width, 'px', self.svg.unit)
        # adjust position
        if old_bbox:
            distance += convert_unit(transformed_left - old_bbox.right, 'px', self.svg.unit) + stretch_space
        if self.options.stretch_spaces and i in space_indices:
            distance += stretch_space
            i += 1
        new_distance = distance + width
        # calculate and apply transform
        first = path.interpolate(distance)
        last = path.interpolate(new_distance)
        angle = degrees(atan2(last.y - first.y, last.x - first.x)) % 360
        translate = InkstitchPoint(first.x, first.y) - InkstitchPoint(left, text_y)
        transform = Transform(f"rotate({angle}, {first.x}, {first.y}) translate({translate.x} {translate.y})")
        correction_transform = Transform(get_correction_transform(glyph))
        glyph.transform = correction_transform @ transform @ glyph.transform @ text_scale
        # set values for next iteration
        distance = new_distance
        old_bbox = transformed_bbox
        i += 1