0xProto Regular - GGUF

A GGUF v3 encoding of 0xProto v2.502, a monospace programming font. Contains lossless vector outlines (bezier control points, contour topology, on-curve flags) and a precomputed 32px F32 bitmap cache for all 719 mapped codepoints.

This is a font, not a language model. general.architecture is font.

Artifact

File 0xProto-Regular-v2.502-F32.gguf
Format GGUF v3, little-endian, alignment=32
Size 1.65 MB
Tensors 2,847
Metadata entries 18
Source font 0xProto-Regular.ttf (206 KB)
License SIL Open Font License 1.1

Tensor layout

Each codepoint with a non-empty glyph gets up to four tensors:

Tensor Shape DType Description
outline.U+XXXX.points [n_points, 2] I32 Bezier control point coordinates in font units (1000 UPM)
outline.U+XXXX.flags [n_points] I32 1 = on-curve anchor, 0 = off-curve quadratic control point
outline.U+XXXX.contours [n_contours] I32 Endpoint index of each closed contour
bitmap.U+XXXX [h, w] F32 Rasterized grayscale bitmap, normalized [0.0, 1.0], tight-cropped

Three global metric tensors cover all 719 codepoints in sorted order:

Tensor Shape DType Description
metrics.advance_widths [719] I32 Horizontal advance per codepoint (font units)
metrics.lsb [719] I32 Left side bearing per codepoint (font units)
metrics.bboxes [719, 4] I32 Bounding box [xMin, yMin, xMax, yMax] per codepoint

The font.codepoint_labels metadata array maps index position to U+XXXX label for the metric tensors.

Metadata

general.architecture    = font
general.name            = 0xProto Regular
general.file_type       = 0 (ALL_F32)
font.family             = 0xProto
font.style              = Regular
font.weight             = 400
font.units_per_em       = 1000
font.is_monospace       = 1.0
font.total_codepoints   = 719
font.render_size_px     = 32
font.postscript_name    = 0xProto-Regular
font.author             = 0xType Project Authors
font.url                = https://0xtype.dev/

Example: reading a glyph outline

# Any GGUF reader works. This is raw struct parsing for zero dependencies.
import numpy as np

points = read_tensor("outline.U+0041.points")  # shape (23, 2)
flags = read_tensor("outline.U+0041.flags")  # shape (23,)
contours = read_tensor("outline.U+0041.contours")  # shape (2,)

# points[:,0] = x, points[:,1] = y in font units (1000 UPM)
# flags[i] = 1 means on-curve, 0 means off-curve quadratic handle
# contours = [15, 22] means outer path ends at index 15, counter at 22

Why

GGUF is a self-describing, mmap-compatible, aligned binary container with typed KV metadata and named N-dimensional tensors. The spec constrains the container syntax but not the application schema. Font glyph outlines are variable-length 2D coordinate arrays with per-point flags and per-glyph contour topology - data that maps to named tensors without any encoding tricks.

The outline tensors are lossless. You could reconstruct the font from this file.

Conversion

Produced by font_to_gguf.py (included in this repo) using fontTools for TTF parsing and Pillow for bitmap rasterization.

pip install fonttools pillow numpy
python font_to_gguf.py

Credit

0xProto is designed by 0xType and released under the SIL Open Font License 1.1.

Downloads last month
10
GGUF
Model size
368k params
Architecture
font
Hardware compatibility
Log In to add your hardware

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support