Browse Source

Fix failing test

pull/10784/head
Benedikt Stebner 4 years ago
parent
commit
a00946492d
  1. 20
      src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

20
src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

@ -697,6 +697,16 @@ namespace Avalonia.Media.TextFormatting
i = lastRunIndex;
//Possible overlap at runs of different direction
if (directionalWidth == 0)
{
//In case a run only contains a linebreak we don't want to skip it.
if (currentRun is ShapedTextRun shaped && currentRun.Length - shaped.GlyphRun.Metrics.NewLineLength > 0)
{
continue;
}
}
int coveredLength;
TextBounds? textBounds;
@ -826,6 +836,16 @@ namespace Avalonia.Media.TextFormatting
i = firstRunIndex;
//Possible overlap at runs of different direction
if (directionalWidth == 0)
{
//In case a run only contains a linebreak we don't want to skip it.
if (currentRun is ShapedTextRun shaped && currentRun.Length - shaped.GlyphRun.Metrics.NewLineLength > 0)
{
continue;
}
}
TextBounds? textBounds = null;
int coveredLength;

Loading…
Cancel
Save