private void WriteContentLine(WordAndFontLine line) { FontStyle currentFont = FontStyle.Plain; _page.NextLine(line.Indent, 0); foreach (var i in line.Line) { if (i.Style != currentFont) { switch (i.Style) { case FontStyle.Bold: _page.SetFont(_courierBold, _settings.FontSize); break; case FontStyle.Italic: _page.SetFont(_courierItalic, _settings.FontSize); break; case FontStyle.BoldItalic: _page.SetFont(_courierBoldItalic, _settings.FontSize); break; case FontStyle.Plain: _page.SetFont(_courier, _settings.FontSize); break; } currentFont = i.Style; } _page.WriteText(i.Word + " "); } _page.NextLine(-line.Indent, 0); if (currentFont != FontStyle.Plain) { _page.SetFont(_courier, _settings.FontSize); } }
private void WriteContentLine(WordAndFontLine line) { FontStyle currentFont = FontStyle.Plain; _page.NextLine(line.Indent, 0); foreach(var i in line.Line) { if (i.Style != currentFont) { switch (i.Style) { case FontStyle.Bold: _page.SetFont(_courierBold, _settings.FontSize); break; case FontStyle.Italic: _page.SetFont(_courierItalic, _settings.FontSize); break; case FontStyle.BoldItalic: _page.SetFont(_courierBoldItalic, _settings.FontSize); break; case FontStyle.Plain: _page.SetFont(_courier, _settings.FontSize); break; } currentFont = i.Style; } _page.WriteText(i.Word + " "); } _page.NextLine(-line.Indent, 0); if (currentFont != FontStyle.Plain) _page.SetFont(_courier, _settings.FontSize); }