From 73cff2e67b525d1b6454ffe1378f12e968151d9d Mon Sep 17 00:00:00 2001 From: Katie Gould Date: Tue, 19 Mar 2024 07:57:45 -0400 Subject: [PATCH] one final spot where whitespace needs trimming, non CDK as well as CDK --- src/SixLabors.Fonts/TextLayout.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SixLabors.Fonts/TextLayout.cs b/src/SixLabors.Fonts/TextLayout.cs index de1d94f..06889fc 100644 --- a/src/SixLabors.Fonts/TextLayout.cs +++ b/src/SixLabors.Fonts/TextLayout.cs @@ -1321,6 +1321,9 @@ internal static class TextLayout if (index == 0) { + // Now trim trailing whitespace from this line in the case of an exact + // length line break (non CJK) + this.TrimTrailingWhitespaceAndRecalculateMetrics(); return this; }