|
|
@@ -47,9 +47,8 @@ namespace Avalonia.Media.TextFormatting
|
|
|
/// </summary>
|
|
|
/// <param name="textCharacters">The text run.</param>
|
|
|
/// <param name="availableWidth">The available width.</param>
|
|
|
- /// <param name="textRunIndex">Index of the textCharacters parent TextRun</param>
|
|
|
/// <returns></returns>
|
|
|
- internal static int MeasureCharacters(ShapedTextCharacters textCharacters, double availableWidth, int textRunIndex)
|
|
|
+ internal static int MeasureCharacters(ShapedTextCharacters textCharacters, double availableWidth)
|
|
|
{
|
|
|
var glyphRun = textCharacters.GlyphRun;
|
|
|
|
|
|
@@ -74,13 +73,6 @@ namespace Avalonia.Media.TextFormatting
|
|
|
|
|
|
if (currentWidth + advance > availableWidth)
|
|
|
{
|
|
|
- if(glyphCount == 0 && textRunIndex == 0)
|
|
|
- {
|
|
|
- //we need to return at least one characted on the first run
|
|
|
- //or we risk to get a infinity loop when width is less than one character width
|
|
|
- //issue #4806
|
|
|
- glyphCount = 1;
|
|
|
- }
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
@@ -358,7 +350,7 @@ namespace Avalonia.Media.TextFormatting
|
|
|
|
|
|
if (currentWidth + currentRun.Size.Width > availableWidth)
|
|
|
{
|
|
|
- var measuredLength = MeasureCharacters(currentRun, paragraphWidth - currentWidth, runIndex);
|
|
|
+ var measuredLength = MeasureCharacters(currentRun, paragraphWidth - currentWidth);
|
|
|
|
|
|
var breakFound = false;
|
|
|
|