Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Huy H. on August 24, 2018, 10:40:36 pm



Title: Question regarding true type font (TTF) caching
Post by: Huy H. on August 24, 2018, 10:40:36 pm
We have a question regarding how GDC and GBC handle the true type fonts caching that are used to display icons in Genero.  From what we observe, it seems like the TTF font is cached only for the duration that the application is running.

Supposed we have application A that launches application B.  We noticed in the GBC web traffic that when application A is launched, GBC downloads the TTF file, then when application B launches, it re-download the same TTF tile all over again (see attached screenshot).  This leads to noticeable slower rendering of the TTF icons when compared to regular .PNG icons (a PNG icon is only a few KB while the TTF icons is in the a few hundred KB). 

We moved our application to use TTF icons hoping that it would lead to better performance, but this is proving to be quite the opposite.  Why not cache the TTF for the  entire session, or better yet, save the TTF between sessions?


Title: Re: Question regarding true type font (TTF) caching
Post by: . on August 26, 2018, 07:49:00 pm
Hello Huy
Indeed, using default setting, the TTF file located in FGLDIR will not be cached. This is more convenient for development. While setting GAS and your application for production you need to take care that TTF files (as any other image files) is in the public image area (see http://4js.com/online_documentation/fjs-gas-manual-html/#gas-topics/c_gas_deployment_public_images.html) so that they are cache-able.
Did you take care of that ?
Olivier.