Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
import { Component } from "@angular/core";
import { Designer, Stimulsoft } from "stimulsoft-dashboards-js-angular/designer";
@Component({
imports: [Designer],
template: `<sti-designer [(report)]="report" [options]="options"></sti-designer>`
})
export class Example {
report: Stimulsoft.Report.StiReport;
options: Stimulsoft.Designer.StiDesignerOptions;
constructor() {
this.report = new Stimulsoft.Report.StiReport();
this.report.loadFile("Dashboards/CusomFontDashboard.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.options = new Stimulsoft.Designer.StiDesignerOptions();
this.options.appearance.fullScreenMode = true;
}
}File.getFile(path, true) — read the .ttf bytes.StiResource(..., StiResourceType.FontTtf, content) + dictionary.resources.add — store the font inside the dashboard.