Closed brimoor closed 8 months ago
A user pointed out that our default lato-regular font doesn't support unicode.
lato-regular
Switching to Arial resolves the issue.
import cv2 import fiftyone as fo import numpy as np cv2.imwrite("/tmp/sample.png", np.full((1024, 1024, 3), 255)) sample = fo.Sample( filepath="/tmp/sample.png", detections=fo.Detections( detections=[ fo.Detection(label="Объект", bounding_box=[0.4, 0.4, 0.2, 0.2]) ] ), ) dataset = fo.Dataset() dataset.add_sample(sample) # Previous workaround: manually specify a unicode-friendly font # dataset.draw_labels("/tmp/sample", font_path="Arial.ttf") # Now this works by default dataset.draw_labels("/tmp/draw-labels")
A user pointed out that our default
lato-regular
font doesn't support unicode.Switching to Arial resolves the issue.