Fix doc job for pillow 11.0.0
Pillow 10.0.0 removed the getsize() fucntion and replaced with getbbox()[1]. We recently staretd using pillow 11.0.0 in upstream testing[2]. Fixing doc job for the same. [1] https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods [2] https://review.opendev.org/c/openstack/requirements/+/935506 Change-Id: Ied78aa9b87be40803cdb6d6b63ce25691a29fc0c
This commit is contained in:
parent
1e547ae39f
commit
9df0cdeaa7
@ -93,8 +93,8 @@ height="20" x="{svg_x}" y="{svg_y}">
|
||||
def _badge(left_text, right_text, link=None, colorscheme='brightgreen'):
|
||||
|
||||
font = ImageFont.truetype('DejaVuSans.ttf', 11)
|
||||
left_width = font.getsize(left_text)[0] + PADDING
|
||||
right_width = font.getsize(right_text)[0] + PADDING
|
||||
left_width = font.getbbox(left_text)[0] + PADDING
|
||||
right_width = font.getbbox(right_text)[0] + PADDING
|
||||
width = left_width + right_width
|
||||
|
||||
data = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user