B2021-058 The fix for the bolded symbol character caused this. We initially set the font being used to a new font instance but without the bolding and italics attributes. Found that in this case we needed to double the font size being passed into the method that creates the new font instance, because it assumes the size is coming from RTF formatting in which the number for the font size is double the actual point size.

This commit is contained in:
John Jenko 2021-05-05 15:21:59 +00:00
parent 11a6a82f43
commit 54b578ed34

View File

@ -617,9 +617,10 @@ namespace Volian.Print.Library
if (_MyFont == null)
{
_MyFont = font;
//B2021-055 if first character was a bold symbol, entire line was bold
//B2021-055 If first character was a bold symbol, entire line was bold
// Set the MyParagraph font to an not bolded version
_MyParagraph.Font = Volian.Svg.Library.VolianPdf.GetFont(font.Familyname, (int)font.Size, 0);
//B2021-058 Needed to double font size because GetFont will divide it to zero
_MyParagraph.Font = Volian.Svg.Library.VolianPdf.GetFont(font.Familyname, (int)(font.Size * 2), 0);
}
}