Regarding commit 7e3cff3
Hello. I reviewed and tested commit 7e3cff3, and made a patch that fixes some problems in it. 1. There's a semicolon after an if statement, which is obviously a typo. 2. The current way of calculating text position in "xdraws" yields inconsistent results in some cases. This is due to the use of "font->width", which varies. Instead, "xw.cw" has to be used as the character width. Sincerely, Eon
This commit is contained in:
		
							parent
							
								
									587bc939f6
								
							
						
					
					
						commit
						f3d438b101
					
				
							
								
								
									
										6
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								st.c
									
									
									
									
									
								
							| @ -3111,7 +3111,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||||||
| 							winy + font->ascent, | 							winy + font->ascent, | ||||||
| 							(FcChar8 *)u8fs, | 							(FcChar8 *)u8fs, | ||||||
| 							u8fblen); | 							u8fblen); | ||||||
| 					xp += CEIL(font->width * cwscale * u8fl); | 					xp += xw.cw * u8fl; | ||||||
| 
 | 
 | ||||||
| 				} | 				} | ||||||
| 				break; | 				break; | ||||||
| @ -3121,7 +3121,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||||||
| 			u8fblen += u8cblen; | 			u8fblen += u8cblen; | ||||||
| 		} | 		} | ||||||
| 		if(doesexist) { | 		if(doesexist) { | ||||||
| 			if (oneatatime); | 			if (oneatatime) | ||||||
| 				continue; | 				continue; | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| @ -3184,7 +3184,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||||||
| 				xp, winy + frc[i].font->ascent, | 				xp, winy + frc[i].font->ascent, | ||||||
| 				(FcChar8 *)u8c, u8cblen); | 				(FcChar8 *)u8c, u8cblen); | ||||||
| 
 | 
 | ||||||
| 		xp += CEIL(font->width * cwscale); | 		xp += xw.cw; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user