I add a table to a pdf document and I want to print a unicode character in one cell with additional text. The problem is as soon as I add the unicode character the font is changed for the whole TextFragment.
row = table.Rows.Add();
row.FixedRowHeight = 18;
text = new TextFragment();
if (titel.Zustellungsnachweis)
{
text.Segments.Add(new TextSegment("\u2612"));
}
else
{
text.Segments.Add(new TextSegment("\u2610"));
}
var segment = new TextSegment(" additional Text");
segment.TextState.FontStyle = FontStyles.Bold;
segment.TextState.Font = fonts[3];
text.Segments.Add(segment);
var cell = row.Cells.Add();
cell.Paragraphs.Add(text);
If I dont add the TextFragment to the table but as a seperate Segment after the table, the additional Text keeps its font. Only inside the table cell it changes the font for the whole TextFragment.
The TextFragment is in the last row of the table. I want it inside the table because it’s the easiest way to get a border around the table and the TextFragment.