B2019-067 Added check for use of a proportional symbol font in the logic that will replace our symbol character with a WingDing font character (used for the Clock, Check Mark, and Heavy X symbols)
This commit is contained in:
parent
27944c837d
commit
7d7d9cb42b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user