getTextDimensions ?-float? ?-font dict? ?-width num? string
Return the dimensions of the enclosing box for the string drawn with the given options. The options have the following meaning:
The result is a list of two values corresponding to the width and height of the bounding rectangle.