Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ReSharper disable ForCanBeConvertedToForeach
// ReSharper disable ForCanBeConvertedToForeach
using System;
using System.Buffers;
using System.Collections.Generic;
Expand Down Expand Up @@ -662,7 +662,7 @@ private static int MeasureLength(IReadOnlyList<TextRun> textRuns, double paragra
clusterLength = shapedTextCharacters.GlyphRun.Metrics.FirstCluster + currentRun.Length - currentInfo.GlyphCluster;
}

if (currentWidth + clusterWidth > paragraphWidth)
if (MathUtilities.GreaterThan(currentWidth + clusterWidth, paragraphWidth))
{
if (runLength == 0 && measuredLength == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Avalonia.Media.TextFormatting.Unicode;
Expand Down Expand Up @@ -1423,7 +1423,7 @@ private TextLineMetrics CreateLineMetrics()
var overhangLeading = inkBounds.Left;
//The width of overhanging pixels at the end of the natural bounds. Positive value means we are inside.
var overhangTrailing = widthIncludingWhitespace - inkBounds.Right;
var hasOverflowed = width > _paragraphWidth;
var hasOverflowed = MathUtilities.GreaterThan(width, _paragraphWidth);

var start = GetParagraphOffsetX(width, widthIncludingWhitespace);

Expand Down