A custom font can be embedded into the report as a resource, so it travels with the template.

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');

    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 designerOptions = new Stimulsoft.Designer.StiDesignerOptions();
    designerOptions.appearance.fullScreenMode = true;

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

export default App;

The font file is read with 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.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.