Repository: python-pillow/Pillow

Issue:
Can't use "align=center" together with "embedded_color=True"
### What did you do?
```python
textwrapped = "Hello, world! 👋 Here are some emojis: 🎨 🌊 😎"
font = ImageFont.truetype(THIS_FOLDER+"/fonts/seguiemj.ttf", font_size) //[merged font](https://github.com/thedemons/merge_color_emoji_font)
d.text((int(qx),int(qy)), text=textwrapped, align="center", fill="#fff", font=font,  embedded_color=True)
```

### What did you expect to happen?
center multiline text

### What actually happened?
if i use "embedded_color=True" together with "align=center" i get this error:
```
 d.text((int(qx),int(qy)), text=textwrapped, align="center", fill="#fff", font=font, embedded_color=True)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\ImageDraw.py", line 409, in text
    return self.multiline_text(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\ImageDraw.py", line 563, in multiline_text
    self.text(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\ImageDraw.py", line 498, in text
    draw_text(ink)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\ImageDraw.py", line 480, in draw_text
    self.im.paste(color, coord + coord2, mask)
TypeError: 'float' object cannot be interpreted as an integer
```
**If i remove "align=center"**  see here: https://imgur.com/a/rLnenPj - embedded color works fine:

![image](https://user-images.githubusercontent.com/1324225/185992808-717e6648-4f2b-426b-bfe6-06372106f871.png)

**If i remove "embedded_color=True"**  see here: https://imgur.com/a/Exq6aYe - align center works fine:

![image](https://user-images.githubusercontent.com/1324225/185992847-f2d74871-c309-4dcb-bc32-ebc0c20da07b.png)

**but they cant work together.**

### What are your OS, Python and Pillow versions?
* OS: Windows 10
* Python: 3.10
* Pillow: 9.2



Discussion:

Resolving patch:
diff --git a/src/PIL/ImageDraw.py b/src/PIL/ImageDraw.py
--- a/src/PIL/ImageDraw.py
+++ b/src/PIL/ImageDraw.py
@@ -482,8 +482,8 @@ def draw_text(ink, stroke_width=0, stroke_offset=None):
                 # extract mask and set text alpha
                 color, mask = mask, mask.getband(3)
                 color.fillband(3, (ink >> 24) & 0xFF)
-                coord2 = coord[0] + mask.size[0], coord[1] + mask.size[1]
-                self.im.paste(color, coord + coord2, mask)
+                x, y = (int(c) for c in coord)
+                self.im.paste(color, (x, y, x + mask.size[0], y + mask.size[1]), mask)
             else:
                 self.draw.draw_bitmap(coord, mask, ink)
 


Test patch:
diff --git a/Tests/images/text_float_coord.png b/Tests/images/text_float_coord.png
new file mode 100644
Binary files /dev/null and b/Tests/images/text_float_coord.png differ
diff --git a/Tests/images/text_float_coord_1_alt.png b/Tests/images/text_float_coord_1_alt.png
new file mode 100644
Binary files /dev/null and b/Tests/images/text_float_coord_1_alt.png differ
diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py
--- a/Tests/test_imagefont.py
+++ b/Tests/test_imagefont.py
@@ -935,7 +935,30 @@ def test_standard_embedded_color(layout_engine):
     d = ImageDraw.Draw(im)
     d.text((10, 10), txt, font=ttf, fill="#fa6", embedded_color=True)
 
-    assert_image_similar_tofile(im, "Tests/images/standard_embedded.png", 6.2)
+    assert_image_similar_tofile(im, "Tests/images/standard_embedded.png", 3.1)
+
+
+@pytest.mark.parametrize("fontmode", ("1", "L", "RGBA"))
+def test_float_coord(layout_engine, fontmode):
+    txt = "Hello World!"
+    ttf = ImageFont.truetype(FONT_PATH, 40, layout_engine=layout_engine)
+
+    im = Image.new("RGB", (300, 64), "white")
+    d = ImageDraw.Draw(im)
+    if fontmode == "1":
+        d.fontmode = "1"
+
+    embedded_color = fontmode == "RGBA"
+    d.text((9.5, 9.5), txt, font=ttf, fill="#fa6", embedded_color=embedded_color)
+    try:
+        assert_image_similar_tofile(im, "Tests/images/text_float_coord.png", 3.9)
+    except AssertionError:
+        if fontmode == "1" and layout_engine == ImageFont.Layout.BASIC:
+            assert_image_similar_tofile(
+                im, "Tests/images/text_float_coord_1_alt.png", 1
+            )
+        else:
+            raise
 
 
 def test_cbdt(layout_engine):