Text measurement min-content fix (#24859)