diff --git a/PROMS/Volian.Print.Library/vlnTab.cs b/PROMS/Volian.Print.Library/vlnTab.cs index 22a375c5..66af4ab6 100644 --- a/PROMS/Volian.Print.Library/vlnTab.cs +++ b/PROMS/Volian.Print.Library/vlnTab.cs @@ -170,12 +170,27 @@ namespace Volian.Print.Library } // if this tab was underlined, we may need to add partial underlining back in, if it was - // removed when the bullet was added. + // removed when the bullet was added. This handles the case where the bullet was appended + // to the tab, for example "NOTE: o". if (removedUnderline) { int sep = origTab.IndexOfAny(". ".ToCharArray()); origTab = @"\ul " + origTab.Substring(0, sep-1) + @"\ulnone" + origTab.Substring(sep-1); } + // if this tab is underlined, the underlining should not underline the ':'. Check for "NOTE:" + // or "CAUTION:", i.e. only underline up to ':' + if (myparent.MyItemInfo.IsStep && ((myparent.MyItemInfo.FormatStepData.AlwaysTab || myparent.MyItemInfo.MyPrevious == null) + && ((vFont.Style & E_Style.Underline) > 0) && (origTab.ToUpper().Contains("NOTE:") || + origTab.ToUpper().Contains("CAUTION:")))) + { + FontStyle style = FontStyle.Regular; + if ((vFont.Style & E_Style.Bold) > 0) style |= FontStyle.Bold; + if ((vFont.Style & E_Style.Italics) > 0) style |= FontStyle.Italic; + vFont.WindowsFont = new System.Drawing.Font(vFont.Family, (float)vFont.Size, style); + int indxC = origTab.IndexOf(":"); + origTab = @"\ul " + origTab.Substring(0, indxC) + @"\ulnone" + origTab.Substring(indxC); + } + Rtf = GetRtf(origTab, vFont); Rtf = Rtf.Replace("\u0394", @"\f1\u916?\f0 "); // delta 0x0394 if (ScriptCaution)