diff --git a/PROMS/Volian.Print.Library/Grid2Pdf.cs b/PROMS/Volian.Print.Library/Grid2Pdf.cs index 2d3f3207..68093998 100644 --- a/PROMS/Volian.Print.Library/Grid2Pdf.cs +++ b/PROMS/Volian.Print.Library/Grid2Pdf.cs @@ -870,7 +870,9 @@ namespace Volian.Print.Library private string FixRTFToPrint(string rtf,int r, int c) { // Only do this if the text contains symbols. - if (rtf.Contains("VESymbFix")) + // B2019-067 Check for a proportional symbol font such as FreeSerif which is used for proportional fonts. + // The Clock, Check Mark, and Heavy X symbols were not printing the correct character (all are replaced with a WingDing font character) + if (rtf.Contains("VESymbFix") || rtf.Contains(Volian.Base.Library.vlnFont.ProportionalSymbolFont)) { // bug fix: B2017-117 was getting an out of window handles error when doing a print all for Bryon // add the using statment to free up window handle that is created doing a New RichTextBox() @@ -903,7 +905,8 @@ namespace Volian.Print.Library { rtb.Select(i, 1); // If the character is a printable character set the font to the text font - if (rtb.SelectionLength == 0 && strRTF != null && rtb.SelectionFont.FontFamily.Name == "VESymbFix") + // B2019-067 also check for a proportional symbol font for example, FreeSerif + if (rtb.SelectionLength == 0 && strRTF != null && (rtb.SelectionFont.FontFamily.Name == "VESymbFix" || rtb.SelectionFont.FontFamily.Name == Volian.Base.Library.vlnFont.ProportionalSymbolFont)) { // Add debug information to the error log if the selection length is zero // Changed debug information to make it more useful @@ -912,7 +915,8 @@ namespace Volian.Print.Library } // bug fix: B2017-046 - check for selection length of zero to fix index out of bounds error // System.Windows.Forms.RichTextBox is having issues selection text in some cases (ex. Symbol char followed by a RO reference - without a space between them) - if (rtb.SelectionLength > 0 && rtb.SelectionFont.FontFamily.Name == "VESymbFix" && rtb.SelectedText[0] > ' ' && rtb.SelectedText[0] <= '\xFF') + // B2019-067 also check fora proportional symbol font for example, FreeSerif + if (rtb.SelectionLength > 0 && (rtb.SelectionFont.FontFamily.Name == "VESymbFix" || rtb.SelectionFont.FontFamily.Name == Volian.Base.Library.vlnFont.ProportionalSymbolFont) && rtb.SelectedText[0] > ' ' && rtb.SelectedText[0] <= '\xFF') { //use bolding underline italics from local font System.Drawing.Font fnt = rtb.SelectionFont;