Be less strict about font selection for CI purposes
@@ -57,7 +57,12 @@ def _full_license(image_info):
def _print_attribution_for_image_on_frame(image_info, image, frame):
vertical_margin_to_image = 16 # vertical margin between image and text
+ try:
font = ImageFont.truetype('SourceSansPro-Bold.ttf', size=18)
+ except OSError:
+ # If we can't find the font, just fall back to the default.
+ # This path should only be hit in CI tests.
+ font = None
draw = ImageDraw.Draw(frame)
text_position_x = int(horizontal_margin / 2)
text_position_y = \
