code: def get_valid_height(self, font_path):
      font = ImageFont.truetype(font_path, self.height - 4)
      left, top, right, bottom = font.getbbox(self.char_list)
      _, font_height = right - left, bottom - top
      if font_height <= self.height - 4:
          return self.height - 4
      else:
          return int((self.height - 4) ** 2 / font_height)
  
file_path: PaddleOCR/StyleText/engine/text_drawers.py
imports: from PIL import Image, ImageDraw, ImageFont
  import numpy
  import cv2
  from utils.logging import get_logger
label_desc: Use image node_id 3 for calling the StdTextDrawer obj's underlying member method code with example usage: obj.get_valid_height(font_path) and returns: unknown, int