Cloud
Cloud-Dienstleistung für schnelle und effektive Analyse und Visualisierung von Daten für Ihr Business ohne eigene Applikationen zu erstellen oder zu programmieren.
@Component({
selector: "adding-font-to-the-resource",
imports: [Designer],
template: `<sti-designer [(report)]="report" [options]="designerOptions"></sti-designer>`
})
export class AddingFontToTheResource {
report: Stimulsoft.Report.StiReport;
designerOptions: Stimulsoft.Designer.StiDesignerOptions;
constructor() {
this.report = new Stimulsoft.Report.StiReport();
this.report.loadFile("Reports/CusomFontSimpleList.mrt");
var fileContent = Stimulsoft.System.IO.File.getFile("Fonts/LongCang-Regular.ttf", true);
var resource = new Stimulsoft.Report.Dictionary.StiResource("LongCang", "LongCang", false, Stimulsoft.Report.Dictionary.StiResourceType.FontTtf, fileContent);
this.report.dictionary.resources.add(resource);
this.designerOptions = new Stimulsoft.Designer.StiDesignerOptions();
this.designerOptions.appearance.fullScreenMode = true;
}
}File.getFile, wrapped in a StiResource of type FontTtf and added to dictionary.resources. The font is then available inside the designer and in every export.