At the moment this is how i am adding the custom, please feww free to say something to improve if its that the case.
Code: Select all
let fontNames = [
'Arial.ttf',
'Roboto-Black.ttf',
'Roboto-BlackItalic.ttf',
'Roboto-Bold.ttf',
'Roboto-BoldItalic.ttf',
'Roboto-Italic.ttf',
'Roboto-Light.ttf',
'Roboto-LightItalic.ttf',
'Roboto-Medium.ttf',
'Roboto-MediumItalic.ttf',
'Roboto-Regular.ttf',
'Roboto-Thin.ttf',
'Roboto-ThinItalic.ttf'
];
for (let i = 0; i < fontNames.length; i++) {
stiReport.dictionary.resources.clear();
let fileContent = Stimulsoft.System.IO.File.getFile(`${fontFolderPath}${fontNames[i]}`, true, "application/octet-stream", [], true, false, true);
let resource = new Stimulsoft.Report.Dictionary.StiResource(
fontNames[i], fontNames[i].split('.')[0], false, Stimulsoft.Report.Dictionary.StiResourceType.FontTtf, fileContent, false);
stiReport.dictionary.resources.add(resource);
}