Changeset - r28436:0476346a6771
[Not reviewed]
master
0 1 0
Loïc Guilloux - 11 months ago 2024-01-12 18:40:08
glx22@users.noreply.github.com
Fix #11752: [Win32] Wrong multi-line text layout due to incorrect partial run handling (#11761)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/os/windows/string_uniscribe.cpp
Show inline comments
 
@@ -412,13 +412,13 @@ static std::vector<SCRIPT_ITEM> Uniscrib
 
	int cur_pos = 0;
 
	for (std::vector<INT>::iterator l = vis_to_log.begin(); l != vis_to_log.end(); l++) {
 
		std::vector<UniscribeRun>::iterator i_run = start_run + *l;
 
		UniscribeRun run = *i_run;
 

	
 
		/* Partial run after line break (either start or end)? Reshape run to get the first/last glyphs right. */
 
		if (i_run == last_run - 1 && remaining_offset < (last_run - 1)->len) {
 
		if (i_run == last_run - 1 && remaining_offset <= (last_run - 1)->len) {
 
			run.len = remaining_offset - 1;
 

	
 
			if (!UniscribeShapeRun(this->text_buffer, run)) return nullptr;
 
		}
 
		if (i_run == start_run && this->cur_range_offset > 0) {
 
			assert(run.len - this->cur_range_offset > 0);
0 comments (0 inline, 0 general)