mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Gfx: Make AccurateText=1 more consistent with GDI+ for D2D when a newline character is the last character of the text
This commit is contained in:
		@@ -249,6 +249,15 @@ DWRITE_TEXT_METRICS TextFormatD2D::GetMetrics(
 | 
				
			|||||||
					metrics.height += m_LineGap;
 | 
										metrics.height += m_LineGap;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									// GDI+ compatibility: With accurate metrics, the line gap needs to be subtracted
 | 
				
			||||||
 | 
									// from the overall height if the string does not contain newlines.
 | 
				
			||||||
 | 
									if (!strippedLastNewLine && wmemchr(str, L'\n', strLen) == nullptr)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										metrics.height -= m_LineGap;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user