TomographicImaging / CIL-Demos

Apache License 2.0
19 stars 12 forks source link

Error with font not found in Colour Processing Notebook - Windows 11 and New Training Platform (linux) #198

Open lauramurgatroyd opened 1 week ago

lauramurgatroyd commented 1 week ago

When I tried to run on my windows machine I couldn't run the Colour Processing notebook.

In the notebook text is added to an image, and to do this a font is specified. font = ImageFont.truetype('DejaVuSerif.ttf', 50)

The font doesn't exist on my windows machine so this fails with error: ImageFont.truetype cannot open resource

We need to replace the font with something that is standard on all OS.

To get the notebook working on my windows machine I used:

font = ImageFont.truetype('arial.ttf', 50)

Need to test if this works on linux / find out if there is a standard font to use

lauramurgatroyd commented 1 week ago

Can print all fonts on a system using: fc-list

MargaretDuff commented 1 week ago

Image No arial on my linux machine....

lauramurgatroyd commented 1 week ago

Reopening as font not found on our cloud system for training. We decided we need to upload the font file on the CIL-Demos repo