Adding a Font to the Resource
Our sample projects and report templates can help you learn the basics of working with our products.This example shows how to add font to resource for reports. First, Use
In the screenshot below you can see the result of the sample code:

getFile() method to load font file. After that, use StiResource() method to add it to resource:
<script type="text/javascript">
var designer = new Stimulsoft.Designer.StiDesigner(null, "StiDesigner", false);
var report = new Stimulsoft.Report.StiReport();
var fontFileContent = Stimulsoft.System.IO.File.getFile("../reports/Roboto-Black.ttf", true);
var resource = new Stimulsoft.Report.Dictionary.StiResource("Roboto-Black", "Roboto-Black", false, Stimulsoft.Report.Dictionary.StiResourceType.FontTtf, fontFileContent);
report.dictionary.resources.add(resource);
var page = report.pages.getByIndex(0);
//Create text component
var dataText = new Stimulsoft.Report.Components.StiText();
dataText.clientRectangle = new Stimulsoft.System.Drawing.Rectangle(1, 1, 3, 2);
dataText.text = "Sample Text";
dataText.font = new Stimulsoft.System.Drawing.Font("Roboto-Black");
dataText.border.side = Stimulsoft.Base.Drawing.StiBorderSides.All;
page.components.add(dataText);
designer.report = report;
</script>In the screenshot below you can see the result of the sample code:
