|
|
|
@ -607,19 +607,19 @@ namespace Avalonia.Media.TextFormatting |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var clusterLength = Math.Max(0, nextInfo.GlyphCluster - currentInfo.GlyphCluster); |
|
|
|
|
|
|
|
if(clusterLength == 0) |
|
|
|
if (clusterLength == 0) |
|
|
|
{ |
|
|
|
clusterLength = currentRun.Length - runLength; |
|
|
|
} |
|
|
|
|
|
|
|
if(clusterLength == 0) |
|
|
|
if (clusterLength == 0) |
|
|
|
{ |
|
|
|
clusterLength = shapedTextCharacters.GlyphRun.Metrics.FirstCluster + currentRun.Length - currentInfo.GlyphCluster; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (currentWidth + clusterWidth > paragraphWidth) |
|
|
|
{ |
|
|
|
@ -713,7 +713,7 @@ namespace Avalonia.Media.TextFormatting |
|
|
|
|
|
|
|
var measuredLength = MeasureLength(textRuns, paragraphWidth); |
|
|
|
|
|
|
|
if(measuredLength == 0 && paragraphProperties.TextWrapping == TextWrapping.WrapWithOverflow) |
|
|
|
if (measuredLength == 0 && paragraphProperties.TextWrapping == TextWrapping.WrapWithOverflow) |
|
|
|
{ |
|
|
|
for (int i = 0; i < textRuns.Count; i++) |
|
|
|
{ |
|
|
|
@ -841,7 +841,7 @@ namespace Avalonia.Media.TextFormatting |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (lineBreak.PositionMeasure != lineBreak.PositionWrap) |
|
|
|
if (lineBreak.PositionMeasure != lineBreak.PositionWrap || lineBreak.PositionWrap != currentRun.Length) |
|
|
|
{ |
|
|
|
lastWrapPosition = currentLength + lineBreak.PositionWrap; |
|
|
|
} |
|
|
|
@ -858,12 +858,6 @@ namespace Avalonia.Media.TextFormatting |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
//We don't want to surpass the measuredLength with trailing whitespace when we are in a right to left setting.
|
|
|
|
if(currentPosition > measuredLength && resolvedFlowDirection == FlowDirection.RightToLeft) |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
measuredLength = currentPosition; |
|
|
|
|
|
|
|
break; |
|
|
|
|