- Fix further issues with EMI
- Add
sortTextRenderLayers
option- This was treated as always-on but is now disabled by default
Initial port to Minecraft 1.19.4.
Fix an issue where selection highlights in sign edit screens flashed like the cursor.
This is a backport of 0.4.0-beta.2 to 1.18.2.
This is a backport of 0.4.0-beta.2 to 1.19.2.
This is a minor change to be backported to other versions.
- Change the extension for cached texture list files from
.zst
to.zz
to reflect the actual file format.
- Implement outlined text (such as on glow ink signs) for
raster
fonts. This is controlled by therange
parameter in the font metadata JSON. - Force glyphs to be rasterized such that the baseline is aligned to a pixel boundary at the highest mipmap level requested. In less technical terms, this fixes an issue where text would render without a consistent baseline in raster fonts, especially at high mipmap levels.
- Implement the
blur
option for raster fonts, which specifies whether texels in the glyph bitmaps should be interpolated. The option is set in the font provider JSON and not the font metadata JSON as previously specified. - Fix a bug where reloading resource packs would break text rendering.
- Patch the vanilla
rendertype_text_intensity
andrendertype_text_intensity_see_through
core shaders so that the texel intensity only affects the alpha component of the fragment colors (instead of all components). This means that raster fonts with partial transparency should no longer have gray edges when rendered.
This release requires Fabric Loader 0.14.16 or later.
Limitations
- Outlined text is still not implemented properly for raster fonts.
- Text in raster fonts with smooth outlines (i.e.
blur
set to true) look blurry.
This is an experimental version for testing non-MSDF-based text rendering.
Originally, Caxton has supported MSDF-based text rendering only. However, there are situations in which this method is not ideal:
- Pixel fonts: the MSDF-based method does not render with crisp borders. However, the ability to have advanced text layout support is useful enough to have better support for these types of fonts.
- Use with shader mods such as Iris Shaders: Caxton currently adds its own core shaders. These work as long as text is rendered outside the world, such as in GUIs or HUDs. Text rendered inside the world, such as on signs and name tags, however, does not render when a shader is active. A conventional bitmap-based pipeline would allow Caxton to work with Iris, albeit with lower graphical quality than with the MSDF-based pipeline.
Configuration
The following options have been added to the font metadata JSON:
{
// Specifies whether to use the MSDF-based rendering method ("msdf") or
// to use glyph bitmaps ("raster").
// "msdf" is recommended for most fonts, but "raster" is more suitable for
// pixel fonts.
// Neither method is currently compatible with Iris Shaders, but support for
// "raster" when a shader is present is planned.
"tech": "msdf",
// Whether to interpolate texels in the bitmap (NOT YET IMPLEMENTED).
// Only has an effect on raster tech.
"blur": false,
// The maximum mipmap level (0 – 4).
// This is pointless to set if you’re using the MSDF rendering tech.
// However, it can be useful for non-pixel fonts when you’re using the raster
// rendering tech.
"max_mipmap": 0
}
Limitations
- Outline text (such as on signs with glow ink) does not render with outlines in
raster
fonts. - Currently, Caxton still uses custom core shaders for
raster
text. This will probably be fixed in a later snapshot.
This is a major update to Caxton.
Lazy glyph uploading
This release changes the way glyphs are uploaded to the GPU. Previously, all glyphs would be put in a texture atlas and uploaded to VRAM eagerly during loading, which was wasteful for large fonts. This version uploads each glyph if and when it is needed.
Note that MTSDF calculation is still done eagerly, as it takes about 50 ms per glyph.
Cached glyph storage
MTSDF calculations are now done in parallel, using all available CPUs. The file format for this information has also been changed.
Other additions
/caxtondumpatlas
command to dump the dynamic texture atlasdebugRefcountChanges
global optionfont_scale
option to font provider- This sets the scale at which the font should be drawn relative to the default
caxton_providers
key in font JSON- Acts like
providers
but will be ignored when Caxton is not installed.
- Acts like
Changes and fixes
margin
now defaults torange
in font metadatarange
now has a hard limit of 255- Underlines and strikethroughs now draw with at least 1 pixel of thickness
- Text fields now draw placeholder text in the 1.19.3 version
- Add fixes for multi-line edit boxes (1.19.2 and later)
- Fix compatibility with TweakerMore’s
disableSignTextLengthLimit
feature - Fix a bug where line-wrapping certain text containing RTL scripts would return the text in the wrong order
- Fix various layout-related crashes