Download Caxton — Minecraft Mods — MetaMods
Caxton

Caxton

Active

Downloads

5

Last update

3 weeks ago

Versions

1.18.2 — 1.21.9-rc1
Client
Fabric
Forge
Neoforge
Libraries
Utils

Caxton

Introduction

The Caxton modification (named after William Caxton) extends Minecraft's capabilities by adding full support for TrueType and OpenType font formats.

Key Features

Thanks to MSDF technology, text appears sharp at any scale. The mod supports genuine bold and italic font styles, as well as complex text rendering. Importantly, it does not use AWT.

Current Limitations

Arabic shaping in legacy fonts is not currently supported. To display Arabic text correctly, you need to use fonts with appropriate support under Caxton.

Creating MTSDF from fonts requires significant resources, so the process is parallelized and results are cached after the first execution.

Many interface elements in Minecraft and other mods make incorrect assumptions about text rendering. Fixing issues with bidirectional text and ligatures will require substantial effort.

Font hinting will probably never be supported.

Mod Compatibility

Partially Compatible

  • Sodium — all versions except combination Caxton <0.6.0 + Sodium 0.5.5
  • ImmediatelyFast (≥1.2.0) — requires disabling the sortTextRenderLayers option in Caxton
  • Exordium — need to disable sign buffering

Incompatible

  • Iris Shaders — text with MSDF fonts does not render in the world
  • Emojiful — completely replaces Minecraft's default text renderer
  • MemoryLeakFix (≤1.1.1)
  • VanillaIcecreamFix (≤1.2.1-beta+1.20.4)
  • Porting Lib (<1.2.1451-beta+1.18.2/2.1.1453+1.19.2)
  • Advent of Ascension (1.20.4-3.7.7)

Layout Issues

The following mods may incorrectly handle text layout:

  • IBE Editor — uses a custom text field widget
  • Roughly Enough Items — uses unsupported methods in some widgets

Operating System Support

Caxton uses a native library for text shaping and MSDF generation. Pre-built mod versions include libraries for x86_64 Windows and Linux. For other platforms, self-compilation is required.

Using Caxton

The mod comes with two built-in font resource packs: Inter and Open Sans. To use custom fonts, you can create a resource pack.

Adding Fonts via Resource Packs

Caxton adds a font provider of type caxton with support for regular, bold, italic, and bold_italic keys. Each key can be set to an identifier where : corresponds to the font file assets//textures/font/.

{
  "file": "<namespace>:<path>",
  "scale_factor": 1.0,
  "shadow_offset": 1.0,
  "shift": [0.0, 0.0],
  "features": [],
  "blur": false
}

To configure font rasterization, you can add a file assets//textures/font/.json:

{
  "shrinkage": 32.0,
  "margin": 4,
  "range": 4,
  "invert": null,
  "variations": [],
  "face_index": 0,
  "tech": "msdf",
  "max_mipmap": 0,
  "blur": false
}

Global Configuration

Settings are available in config/caxton.json:

{
  "rustTarget": null,
  "tweakExpText": true,
  "sortTextRenderLayers": false,
  "fatalOnBrokenMethodCall": false,
  "debugRefcountChanges": false,
  "disableEasterEggs": false
}

Building from Source

To build Caxton, you need to install the Rust toolchain, Clang, and Gradle. By default, the native library is built only for the host platform. To build for additional platforms, specify target triples in the xyz.flirora.caxton.additionalTargets property.

Comparison with Other Mods

Caxton offers a modern approach to text rendering using MSDF technology, providing superior display quality compared to traditional solutions like BetterFonts, Smooth Font, and Minecraft's standard implementation.

Project members
flirora

flirora

Developer

TysonTheEmber

TysonTheEmber

Created: 24 Nov 2022

ID: 1931