Hi Jon,
Please read below:
1. Siberix Report Writer requires TTF font data. We parse the data on the fly to retrieve all the required information about the font (metrics, glyphs, etc.) and also need it to provide the support for embedding and subsetting (when allowed by the creator of the font).
2. Unfortunately, WinRT / WinStore runtime doesn't provide methods to retrieve this font data directly from the available system fonts. This is why you'd need to supply required font files (somefont.ttf files) all together with your app. Please use only fonts that are permitted to be embedded and redistributed by the creator of the font.
3. To reference a TTF font file from within your app: You need to copy this font file into the project folder of your app and set their "Build Action" to "Content" and "Copy to Output Directory" to "Copy always". Then you may use our helper PackageResource class to get the access to the underlying font data stream
// Resources and Fonts (some private class members)
private PackageResource Arial;
private Siberix.Graphics.Font font1;
...
Arial = new PackageResource("arial.ttf");
font1 = new Siberix.Graphics.Font(await Arial.GetDataAsync(), 80);
// Report
Siberix.Report.Report report = new Siberix.Report.Report();
// Section
Siberix.Report.Section.ISection section = report.AddSection();
section.Size = Siberix.Report.PageSize.Letter;
section.Spacings.All = 35;
// Styles
Siberix.Report.Text.Style style1 = new Siberix.Report.Text.Style(font1, Siberix.Graphics.Brushes.DarkBlue);
Siberix.Report.Text.IText text = section.AddText();
text.Style = style1;
text.Width = new Siberix.Report.RelativeWidth(100);
text.AddContent("Hello PDF");
4. Please also take a look at the examples (HelloPDF and Elements) available for the download as a part of the evaluation package for the Report Writer for WinStore at our web site (
http://www.siberix.com).
Thank You,
Victor