scripts: Update CFB font generator

Update CFB font generator so it works with Pillow version 10. They
deprecated some methods, with no direct replacements, so the generated
fonts might be slightly different.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
diff --git a/scripts/build/gen_cfb_font_header.py b/scripts/build/gen_cfb_font_header.py
index dacb76c..0bba785 100755
--- a/scripts/build/gen_cfb_font_header.py
+++ b/scripts/build/gen_cfb_font_header.py
@@ -76,7 +76,13 @@
     fw_max = 0
     fh_max = 0
     for i in range(args.first, args.last + 1):
-        fw, fh = font.getsize(chr(i))
+        # returns (left, top, right, bottom) bounding box
+        size = font.getbbox(chr(i))
+
+        # calculate width + height
+        fw = size[2] - size[0]  # right - left
+        fh = size[3] - size[1]  # bottom - top
+
         if fw > fw_max:
             fw_max = fw
         if fh > fh_max:
@@ -100,7 +106,12 @@
         image = Image.new('1', (width, height), 'white')
         draw = ImageDraw.Draw(image)
 
-        fw, fh = draw.textsize(chr(i), font=font)
+        # returns (left, top, right, bottom) bounding box
+        size = draw.textbbox((0, 0), chr(i), font=font)
+
+        # calculate width + height
+        fw = size[2] - size[0]  # right - left
+        fh = size[3] - size[1]  # bottom - top
 
         xpos = 0
         if args.center_x: