code: def font_size_splitter(font_map):
      
      small_font = []
      medium_font = []
      large_font = []
      xlarge_font = []
      fonts = set(font_map.keys()) - set(RANDOM_FILTERED_FONTS)
      for font in fonts:
          length = max(map(len, font_map[font][0].values()))
          if length <= FONT_SMALL_THRESHOLD:
              small_font.append(font)
          elif length > FONT_SMALL_THRESHOLD and length <= FONT_MEDIUM_THRESHOLD:
              medium_font.append(font)
          elif length > FONT_MEDIUM_THRESHOLD and length <= FONT_LARGE_THRESHOLD:
              large_font.append(font)
          else:
              xlarge_font.append(font)
      return {
          "small_list": small_font,
          "medium_list": medium_font,
          "large_list": large_font,
          "xlarge_list": xlarge_font}
docs: Split fonts to 4 category (small,medium,large,xlarge) by maximum length of letter in each font.
  
      :param font_map: input fontmap
      :type font_map : dict
      :return: splitted fonts as dict