ome / omero-scripts

Core OMERO Scripts

Home Page:https://pypi.org/project/omero-scripts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

will-moore opened this issue · comments

Reported at ome/omero-figure#522

This is the same issue as found on OMERO.figure, where Pillow 10 has removed font.getsize() ome/omero-figure#523

Running Split View Figure script fails with:

Traceback (most recent call last):
  File "./script", line 802, in <module>
    run_script()
  File "./script", line 790, in run_script
    [file_annotation, message] = split_view_figure(conn, script_params)
  File "./script", line 630, in split_view_figure
    fig = make_split_view_figure(
  File "./script", line 389, in make_split_view_figure
    text_height = font.getsize("Textq")[1]
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

cc @juliomateoslangerak

Ah - this should be fixed at #214

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omere-figure-export-pdf-does-not-work/39573/32