I am now passing my privateFonts variable to renderer.PrivateFonts like this:
Code:
DocumentRenderer renderer = new DocumentRenderer(document);
renderer.PrivateFonts = privateFonts;
renderer.PrepareDocument();
renderer.RenderPage(gfx,1);
and I am creating the privateFonts object further up in my code like this:
Code:
XPrivateFontCollection privateFonts = new XPrivateFontCollection();
byte[] fontData = File.ReadAllBytes(fontFileName);
privateFonts.AddMemoryFont(fontData, fontData.Length, "Arial Unicode MS", false, false);
But when i put a unicode character into my table, it wont embed!
I looked at the fonts tab in the pdf's properties and its saying im using Arial Unicode MS, but its not embedded and its using Ansi encoding. Dont I have to create a MigraDoc.DocumentObjectModel.Font object and tell it to "always embed fonts" and "use unicode encoding" like I do with the PDFSharp XFont object?