mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Fixed bug: ImageDraw.multiline_textsize() returning wrong size by adding extra spacing
This commit is contained in:
		
							parent
							
								
									0b65d0791e
								
							
						
					
					
						commit
						d6926009d0
					
				| 
						 | 
					@ -271,7 +271,7 @@ class ImageDraw(object):
 | 
				
			||||||
            line_width, line_height = self.textsize(line, font, spacing,
 | 
					            line_width, line_height = self.textsize(line, font, spacing,
 | 
				
			||||||
                                                    direction, features)
 | 
					                                                    direction, features)
 | 
				
			||||||
            max_width = max(max_width, line_width)
 | 
					            max_width = max(max_width, line_width)
 | 
				
			||||||
        return max_width, len(lines)*line_spacing
 | 
					        return max_width, len(lines)*line_spacing - spacing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def Draw(im, mode=None):
 | 
					def Draw(im, mode=None):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user