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
.zstto.zzto reflect the actual file format.
- Implement outlined text (such as on glow ink signs) for
rasterfonts. This is controlled by therangeparameter 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
bluroption 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_intensityandrendertype_text_intensity_see_throughcore 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.
blurset 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
rasterfonts. - Currently, Caxton still uses custom core shaders for
rastertext. 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
/caxtondumpatlascommand to dump the dynamic texture atlasdebugRefcountChangesglobal optionfont_scaleoption to font provider- This sets the scale at which the font should be drawn relative to the default
caxton_providerskey in font JSON- Acts like
providersbut will be ignored when Caxton is not installed.
- Acts like
Changes and fixes
marginnow defaults torangein font metadatarangenow 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
disableSignTextLengthLimitfeature - Fix a bug where line-wrapping certain text containing RTL scripts would return the text in the wrong order
- Fix various layout-related crashes
- Add
font_scaleoption to font provider - Add support for
caxton_providerskey in font JSON- This can be used instead of
providersbut will be ignored when Caxton is not present
- This can be used instead of
- Fix a bug where line-wrapping certain text containing RTL scripts would return the text in the wrong order



