mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-31 10:37:00 -04:00 
			
		
		
		
	Fix #86
This commit is contained in:
		
							parent
							
								
									73c09fbdbf
								
							
						
					
					
						commit
						23b87aa650
					
				| @ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to | |||||||
| suit your distribution. | suit your distribution. | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| __version__   = "0.3.39" | __version__   = "0.3.40" | ||||||
| __docformat__ = "epytext" | __docformat__ = "epytext" | ||||||
| __author__    = "Kovid Goyal <kovid@kovidgoyal.net>" | __author__    = "Kovid Goyal <kovid@kovidgoyal.net>" | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -163,18 +163,18 @@ class Cell(object): | |||||||
|         ts = tb.textStyle.attrs |         ts = tb.textStyle.attrs | ||||||
|         default_font = get_font(ts['fontfacename'], self.pts_to_pixels(ts['fontsize'])) |         default_font = get_font(ts['fontfacename'], self.pts_to_pixels(ts['fontsize'])) | ||||||
|         parindent = self.pts_to_pixels(ts['parindent']) |         parindent = self.pts_to_pixels(ts['parindent']) | ||||||
|         ls, ws = self.pts_to_pixels(ts['baselineskip']), self.pts_to_pixels(ts['wordspace']) |         ls, ws = self.pts_to_pixels(ts['baselineskip']) + self.pts_to_pixels(ts['linespace']), self.pts_to_pixels(ts['wordspace']) | ||||||
|         top, bottom, left, right = 0, 0, parindent, parindent |         top, bottom, left, right = 0, 0, parindent, parindent | ||||||
|          |          | ||||||
|         def add_word(width, height, left, right, top, bottom):             |         def add_word(width, height, left, right, top, bottom):             | ||||||
|             if left + width > maxwidth: |             if left + width > maxwidth: | ||||||
|                 left = width + ws |                 left = width + ws | ||||||
|                 top += height + ls |                 top += ls | ||||||
|                 bottom = top+height if top+height > bottom else bottom |                 bottom = top+ls if top+ls > bottom else bottom | ||||||
|             else: |             else: | ||||||
|                 left += (width + ws) |                 left += (width + ws) | ||||||
|                 right = left if left > right else right                     |                 right = left if left > right else right                     | ||||||
|                 bottom = top+height if top+height > bottom else bottom |                 bottom = top+ls if top+ls > bottom else bottom | ||||||
|             return left, right, top, bottom |             return left, right, top, bottom | ||||||
|          |          | ||||||
|         for token, attrs in tokens(tb): |         for token, attrs in tokens(tb): | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user