Use a text object as context for calculating size.