Embedding a font as a dashboard resource makes the template self-contained — it renders with the same typography everywhere.

In React.
import { Designer, Stimulsoft } from "stimulsoft-dashboards-js-react/designer";

function App() {
    var report = new Stimulsoft.Report.StiReport();
    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);
    report.dictionary.resources.add(resource);

    var options = new Stimulsoft.Designer.StiDesignerOptions();
    options.appearance.fullScreenMode = true;

    return <Designer options={options} report={report} />;
}

How it works. The font travels inside the template, so previews and exports use the exact same glyphs with no installed font.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.