diff --git a/src/calibre/ebooks/lrf/html/convert_from.py b/src/calibre/ebooks/lrf/html/convert_from.py
index 589ba395ec..c81d1dcdd4 100644
--- a/src/calibre/ebooks/lrf/html/convert_from.py
+++ b/src/calibre/ebooks/lrf/html/convert_from.py
@@ -1809,7 +1809,7 @@ def process_file(path, options, logger):
cim.convert('RGB').save(cf.name)
options.cover = cf.name
- tim = im.resize((int(0.75*th), th), PILImage.ANTIALIAS).convert('RGB')
+ tim = im.resize((int(0.75*th), th), PILImage.Resampling.LANCZOS).convert('RGB')
tf = PersistentTemporaryFile(prefix=__appname__+'_', suffix=".jpg")
tf.close()
tim.save(tf.name)
diff --git a/src/calibre/ebooks/lrf/html/table.py b/src/calibre/ebooks/lrf/html/table.py
index 956eabe14b..de8c483830 100644
--- a/src/calibre/ebooks/lrf/html/table.py
+++ b/src/calibre/ebooks/lrf/html/table.py
@@ -145,7 +145,8 @@ class Cell:
continue
word = token.split()
word = word[0] if word else ""
- width = font.getsize(word)[0]
+ fl, ft, fr, fb = font.getbbox(word)
+ width = fr - fl
if width > mwidth:
mwidth = width
return parindent + mwidth + 2
@@ -191,7 +192,8 @@ class Cell:
if (ff, fs) != (ts['fontfacename'], ts['fontsize']):
font = get_font(ff, self.pts_to_pixels(fs))
for word in token.split():
- width, height = font.getsize(word)
+ fl, ft, fr, fb = font.getbbox(word)
+ width, height = fr - fl, abs(fb - ft)
left, right, top, bottom = add_word(width, height, left, right, top, bottom, ls, ws)
return right+3+max(parindent, 10), bottom