|
BaseChart.setFontTable |
Posted by Naveen on Oct-23-2016 11:23 |
|
Hello Peter,
I've customized the QChartViewer widget to support user specified fonts. I noticed that the only way to set custom fonts that aren't part of system fonts is to specify the full path of the ttf file in BaseChart.setFontTable. Does the font file get reloaded every time setFontTable is called with the same path or is it cached?
Thanks,
Naveen |
Re: BaseChart.setFontTable |
Posted by Peter Kwan on Oct-24-2016 00:55 |
|
Hi Naveen,
The fonts are cached. If I remembered correctly, the cache timeout is 60 seconds, which means if the font is not used for more than 60 seconds, it may be released from cache to save memory.
The operating system itself also has a disk cache. If ChartDirector releases a font, and then reload it later, the operating system may use the disk cache.
In realtime charts where the chart is updated frequently, the fonts are frequently used and this means the cache would not be released. So using user supplied font files has no performance impact.
Hope this can help.
Regards
Peter Kwan |
|