- Add
debugRefcountChanges
option to global config - Add
face_index
option in font face metadata - Text fields now draw their placeholder text
- Fix crash when trying to wrap text with pathologically narrow columns
- This affects mods such as IBE Editor that initially set text area widgets to have a negative width.
- Replace the atlas implementation with a bucketed shelf allocation algorithm that wastes much less space than the previous one
- Add the
/caxtondumpatlas
command to dump the current Caxton glyph atlas for debugging - Validate indices into pixel data associated glyphs when loading cached font data from the disk
Some caveats:
- Due to the new atlas implementation, this release imposes a hard limit of 255 on the
range
parameter in the*.ttf.json
or*.otf.json
file.
As usual, feel free to report bugs or performance regressions on the issue tracker.
This is a text renderer. Now there are two of them. There are two _________________.
- Fixed a bug where opening the chat screen would corrupt text rendering (#13)
As usual, feel free to report bugs or performance regressions on the issue tracker.
This is a test of a major revision in how glyphs are stored to evaluate its viability.
Previously, Caxton created texture atlases for all of the glyphs of a font during resource loading and uploaded them as textures onto the GPU.
This version still computes the MSDF images of each glyph at load time but maintains a dynamic atlas and uploads the glyph textures to the GPU when the respective glyphs are first used. This can save GPU memory for large fonts but might otherwise increase overhead. In addition, the atlas implementation has less information to work with (for instance, it can no longer reorder all of the glyphs by descending height).
Depending on your hardware, the font you use, and the other mods you have installed, Caxton 0.3.0-alpha.1 might perform better or worse than 0.2.3. Feedback on this, as well as any bug reports, are welcome on the issue tracker, but remember to mention the version you’re using.
Limitations
- This version overhauls how cached distance fields are stored, so any fonts you load will need their caches regenerated.
- In particular, cached glyph textures are no longer stored as a .png file. In fact, they’re not compressed at all! This means that cache files will be huge. This will be resolved later.
- Cache files now depend on the endianness of your platform.
- When copying glyph bitmaps from CPU to GPU memory, Caxton does not currently validate the offset to the source data. This will be fixed in a later update, but you might want to avoid loading untrusted cache files for now.
- Only 1.19.3 is currently supported.
The source for this version is available in the feature/lazy-vramming
branch of the repository.