//full label text is Testing highlighting [ffff00]words[ffffff] for lyrics testing shrink and stuff
string text = "Testing highlighting [ffff00]w";
Vector2 v2 = labelTest.font.CalculatePrintedSize(text, labelTest.supportEncoding, labelTest.symbolStyle);
//determine shrink width %
float fXShrink = labelTest.localSize.x / labelTest.printedSize.x;
//position icon above word
Vector3 v3 = IconContainer.transform.localPosition;
float fXPos = ( (v2.x * fXShrink) - (labelTest.localSize.x / 2.0f));
IconContainer
.transform.localPosition = new Vector3
(fXPos, v3
.y, v3
.z);