@@ -351,7 +351,7 @@ Methods
351
351
352
352
Draw a shape.
353
353
354
- .. py :method :: ImageDraw.text(xy, text, fill = None , font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , stroke_fill = None , embedded_color = False )
354
+ .. py :method :: ImageDraw.text(xy, text, fill = None , font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , stroke_fill = None , embedded_color = False , font_size = None )
355
355
356
356
Draws the string at the given position.
357
357
@@ -416,8 +416,14 @@ Methods
416
416
417
417
.. versionadded :: 8.0.0
418
418
419
+ :param font_size: If ``font `` is not provided, then the size to use for the default
420
+ font.
421
+ Keyword-only argument.
419
422
420
- .. py :method :: ImageDraw.multiline_text(xy, text, fill = None , font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , stroke_fill = None , embedded_color = False )
423
+ .. versionadded :: 10.1.0
424
+
425
+
426
+ .. py :method :: ImageDraw.multiline_text(xy, text, fill = None , font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , stroke_fill = None , embedded_color = False , font_size = None )
421
427
422
428
Draws the string at the given position.
423
429
@@ -477,7 +483,13 @@ Methods
477
483
478
484
.. versionadded :: 8.0.0
479
485
480
- .. py :method :: ImageDraw.textlength(text, font = None , direction = None , features = None , language = None , embedded_color = False )
486
+ :param font_size: If ``font `` is not provided, then the size to use for the default
487
+ font.
488
+ Keyword-only argument.
489
+
490
+ .. versionadded :: 10.1.0
491
+
492
+ .. py :method :: ImageDraw.textlength(text, font = None , direction = None , features = None , language = None , embedded_color = False , font_size = None )
481
493
482
494
Returns length (in pixels with 1/64 precision) of given text when rendered
483
495
in font with provided direction, features, and language.
@@ -538,9 +550,15 @@ Methods
538
550
It should be a `BCP 47 language code `_.
539
551
Requires libraqm.
540
552
:param embedded_color: Whether to use font embedded color glyphs (COLR, CBDT, SBIX).
553
+ :param font_size: If ``font `` is not provided, then the size to use for the default
554
+ font.
555
+ Keyword-only argument.
556
+
557
+ .. versionadded :: 10.1.0
558
+
541
559
:return: Either width for horizontal text, or height for vertical text.
542
560
543
- .. py :method :: ImageDraw.textbbox(xy, text, font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , embedded_color = False )
561
+ .. py :method :: ImageDraw.textbbox(xy, text, font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , embedded_color = False , font_size = None )
544
562
545
563
Returns bounding box (in pixels) of given text relative to given anchor
546
564
when rendered in font with provided direction, features, and language.
@@ -588,9 +606,15 @@ Methods
588
606
Requires libraqm.
589
607
:param stroke_width: The width of the text stroke.
590
608
:param embedded_color: Whether to use font embedded color glyphs (COLR, CBDT, SBIX).
609
+ :param font_size: If ``font `` is not provided, then the size to use for the default
610
+ font.
611
+ Keyword-only argument.
612
+
613
+ .. versionadded :: 10.1.0
614
+
591
615
:return: ``(left, top, right, bottom) `` bounding box
592
616
593
- .. py :method :: ImageDraw.multiline_textbbox(xy, text, font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , embedded_color = False )
617
+ .. py :method :: ImageDraw.multiline_textbbox(xy, text, font = None , anchor = None , spacing = 4 , align = " left" , direction = None , features = None , language = None , stroke_width = 0 , embedded_color = False , font_size = None )
594
618
595
619
Returns bounding box (in pixels) of given text relative to given anchor
596
620
when rendered in font with provided direction, features, and language.
@@ -632,6 +656,12 @@ Methods
632
656
Requires libraqm.
633
657
:param stroke_width: The width of the text stroke.
634
658
:param embedded_color: Whether to use font embedded color glyphs (COLR, CBDT, SBIX).
659
+ :param font_size: If ``font `` is not provided, then the size to use for the default
660
+ font.
661
+ Keyword-only argument.
662
+
663
+ .. versionadded :: 10.1.0
664
+
635
665
:return: ``(left, top, right, bottom) `` bounding box
636
666
637
667
.. py :method :: getdraw(im = None , hints = None )
0 commit comments