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.
Font caching / Better sheet font loading
Moderator: GZDoom Developers
-
- Banned User
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
-
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Font caching
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.
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.
-
- Banned User
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Font caching
They're sheet fonts. And I do believe that these are always loaded "in whole".
-
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Font caching
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.
It might be a good idea to let them extract the needed character data and store it locally instead.
-
- Posts: 13914
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Font caching
Yiiikes!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.
-
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Font caching
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.
Yeah, not the best idea, probably, but for the intended purpose it was enough.
-
- Banned User
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Font caching
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.
-
- Banned User
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Font caching / Better sheet font loading
I'd like this thread to be closed, I want to suggest an alternative to this.
-
-
- Posts: 17938
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Font caching / Better sheet font loading
The alternative being: bundling them in wad files.