Page 1 of 1

how to load cached font file?

Posted: Wed Sep 16, 2026 6:53 am
by robops
Hello,
I have a question about load font.For now,I'm using addFontFile with font file path.Although I have cached the font file in serviceworker,however,it request the online resources every time.
This is triggered by stimulsoft.
Image

This is triggered by browser.This is what i expected.
Image

Thank you .

Re: how to load cached font file?

Posted: Wed Sep 16, 2026 9:11 pm
by Lech Kulikowski
Hello,

Could you explain your issue in more detail?

Thank you.

Re: how to load cached font file?

Posted: Thu Sep 17, 2026 12:52 am
by robops
Sure.
I am using Stimulsoft.Base.StiFontCollection.addFontFile() to load custom fonts (simhei.ttf). Although the font file is cached via Service Worker, calling addFontFile() triggers an XHR network request every time rather than serving it from the Service Worker cache.
Thank you.

Re: how to load cached font file?

Posted: Thu Sep 17, 2026 8:51 pm
by Lech Kulikowski
Hello,

Where, in which event, are you loading the font?
Also, please specify which version you are using - there have been improvements related to font caching, so check the latest build.

Thank you.