B2020-134 Replace the “\_” hyphen to “\u8209?” so that the same font as the surrounding text is used.

This commit is contained in:
John Jenko 2020-09-29 19:55:34 +00:00
parent 81f7cc5592
commit d2c52f9999

View File

@ -906,7 +906,8 @@ public string Path
{
// B2020-100 Convert old and new form of non-breaking hyphen to hyphen
// So that underline will work properly.
rtf = FixRTFToPrint(rtf, r, c).Replace(@"\_", "-").Replace(@"\u8209?","-");
// B2020-134 fix to ensure proper font is used when hyphen is replaced
rtf = FixRTFToPrint(rtf, r, c).Replace(@"\_", @"\u8209?");
IRtfDocument rtfDoc = RtfInterpreterTool.BuildDoc(rtf);
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
rtf2IText.DefaultFont = mySymFont;