imgviz.draw.text_size

imgviz.draw.text_size(text, size, font_path=None)[source]

Get text size (height and width).

Parameters:
  • text (str) – Text.

  • size (int) – Pixel font size.

Returns:

  • height (int) – Text height.

  • width (int) – Text width.