Font caching / Better sheet font loading

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Font caching / Better sheet font loading

Re: Font caching / Better sheet font loading

by Gez » Sat Jan 30, 2021 4:24 am

The alternative being: bundling them in wad files.

Re: Font caching / Better sheet font loading

by Marisa the Magician » Sat Jan 30, 2021 3:21 am

I'd like this thread to be closed, I want to suggest an alternative to this.

Re: Font caching

by Marisa the Magician » Tue Jun 30, 2020 3:55 pm

Bumping this. Any interest in changing how sheet fonts are handled? It's kind of a pain to have over 50k tiny files for 3 variants of 4 fonts. It makes SLADE take ages to load up the project and also causes bloat due to "size on disk" inflation.

Re: Font caching

by Graf Zahl » Tue Apr 21, 2020 7:51 am

It was meant to handle the old console font, I just implemented it as a multipatch texture with the whole image being offset so that the character is selected.
Yeah, not the best idea, probably, but for the intended purpose it was enough.

Re: Font caching

by Rachael » Tue Apr 21, 2020 5:50 am

Graf Zahl wrote:It's not a caching issue, but an efficiency issue. The sheet fonts currently load the entire sheet for each needed character and that simply adds up.
Yiiikes!

Re: Font caching

by Graf Zahl » Tue Apr 21, 2020 5:28 am

It's not a caching issue, but an efficiency issue. The sheet fonts currently load the entire sheet for each needed character and that simply adds up.
It might be a good idea to let them extract the needed character data and store it locally instead.

Re: Font caching

by Marisa the Magician » Tue Apr 21, 2020 5:08 am

They're sheet fonts. And I do believe that these are always loaded "in whole".

Re: Font caching

by Graf Zahl » Tue Apr 21, 2020 4:48 am

Considering that fonts can have many color translations this can turn out very expensive. What kind of font is this? So far I never experienced delays from this with existing fonts.
You are also forgetting that in any normal session only a small subset of the font's characters get used, so this kind of caching would create huge delays.

Font caching / Better sheet font loading

by Marisa the Magician » Tue Apr 21, 2020 4:39 am

I have a mod with very... large unicode fonts, and it's kind of an annoyance that whenever those fonts are first loaded they cause a very noticeable freeze. (which in one case happens when first opening the mod's options menu).

Was wondering if it was possible to add a mapinfo/gameinfo parameter for this, just like the ones for caching actor sprites, sounds, etc.

Top