From 6f454134db9fffce98a01838fa9b3f99ee183deb Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 7 Mar 2016 16:32:01 +0000 Subject: [PATCH] =?UTF-8?q?B2016-069:=20Hardspace=20appeared=20to=20be=202?= =?UTF-8?q?=20spaces=20in=20=E2=80=98view=E2=80=99mode=20of=20StepRTB=20if?= =?UTF-8?q?=20proportional=20font=20(Arial)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/StepRTB.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 1565d1c2..c1903b11 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -585,8 +585,17 @@ namespace Volian.Controls.Library // representation (\'01). If you pass in the ASCII representation, it keeps the ASCII representation. // The following two lines replace hard spaces (ASCII) with the UNICODE represntation of Zero. // Other characters which behave like hard spaces are 28-31 and 128-159. - if (!activeMode && Rtf.Contains(@"\'a0")) - Rtf = Rtf.Replace(@"\'a0", @"\u1?"); + if (!activeMode && Rtf.Contains(@"\'a0")) + { + // The following 3 lines were added to fix B2016-069. The issue was in the RichTextBox for the Arial + // (Proportional) font, the hardspace appeared to be 2 spaces (really it was showing the space as the widest + // width character). So instead of a hard space, a single quote "'" was used to designate where the hardspace + // would be. This is only used for display, printing works. + if (_MyItemInfo.FormatStepData != null && _MyItemInfo.FormatStepData.Font.FontIsProportional()) + Rtf = Rtf.Replace(@"\'a0", "'"); + else + Rtf = Rtf.Replace(@"\'a0", @"\u1?"); + } OrigRTF = Rtf; _InitializingRTB = false;