bounding_rectangle (GD2::Font::TrueType)

    # File lib/gd2/font.rb, line 308
        def bounding_rectangle(string, angle = 0.0)
          data = draw(nil, 0, 0, angle, string, 0)

          if string.length == 1
            # gd annoyingly fails to provide xshow data for strings of length 1
            position = draw(nil, 0, 0, angle, string + ' ', 0)[:position]
            data[:position] = position[0...-1]
          end

          data
        end