B2021-038 Added symbols fonts without bold or italic. Some symbol characters would not print if they were bolded.
This commit is contained in:
parent
4bcfa5fbe8
commit
d4b3cced0b
@ -452,6 +452,21 @@ namespace Volian.Print.Library
|
||||
fs.AddFont(FontFactory.GetFont("FreeMono", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, (visualText.Format.FontSize * 1.1F) / 2,
|
||||
(visualText.Format.IsBold ? iTextSharp.text.Font.BOLD : 0) +
|
||||
(visualText.Format.IsItalic ? iTextSharp.text.Font.ITALIC : 0), font.Color));
|
||||
// B2021-038 add the Consolas and FreeMono without Bold or Italic - some symbols are not available as Bold or Italic
|
||||
fs.AddFont(FontFactory.GetFont("Consolas", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, (visualText.Format.FontSize * 1.1F) / 2, 0, font.Color));
|
||||
fs.AddFont(FontFactory.GetFont("FreeMono", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, (visualText.Format.FontSize * 1.1F) / 2, 0, font.Color));
|
||||
Phrase ph = fs.Process(visualText.Text);
|
||||
foreach (Chunk chk in ph.Chunks)
|
||||
{
|
||||
AdjustChunk(visualText, font, chk);
|
||||
_MyParagraph.Add(chk);
|
||||
}
|
||||
}
|
||||
// B2021-038 add the FreeSerif without Bold or Italic - some symbols are not available as Bold or Italic
|
||||
else if (visualText.Format.Font.Name == "FreeSerif" && ContainsAllSymbols(visualText.Text))
|
||||
{
|
||||
fs.AddFont(font);
|
||||
fs.AddFont(FontFactory.GetFont("FreeSerif", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, (visualText.Format.FontSize * 1.1F) / 2, 0, font.Color));
|
||||
Phrase ph = fs.Process(visualText.Text);
|
||||
foreach (Chunk chk in ph.Chunks)
|
||||
{
|
||||
@ -468,7 +483,7 @@ namespace Volian.Print.Library
|
||||
if (font.Familyname == "Prestige Elite Tall" || font.Familyname == "Letter Gothic Tall")
|
||||
ProcessMeans(visualText, visualText.Text.Replace("\u25cf", "\u2022"), font);
|
||||
else
|
||||
ProcessMeans(visualText, visualText.Text, font);
|
||||
ProcessMeans(visualText, visualText.Text, font);
|
||||
}
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
_lastWasLineBreak = 0; // B2017-191 reset hard return count
|
||||
|
Loading…
x
Reference in New Issue
Block a user