Fonts can also be supplied to the whole engine rather than stored in the report. This example registers a TTF file with the global font collection.

Registering the resource. Load or register the external resource before rendering so the finished report remains portable across environments.
import { Designer, Stimulsoft } from 'stimulsoft-reports-js-react/designer';

function App() {
    var report = new Stimulsoft.Report.StiReport();
    report.loadFile('Reports/CusomFontSimpleList.mrt');

    // Adding Custom Font
    Stimulsoft.Base.StiFontCollection.addFontFile('Fonts/LongCang-Regular.ttf');

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

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

export default App;

StiFontCollection.addFontFile makes the font available for rendering and export across all reports, without embedding it into a specific template.

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.