fontprobe

command
v0.1.333 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Command fontprobe reports what two independent font stacks see in one font file: github.com/gogpu/gg/text, which the gogpu backend draws with, and golang.org/x/image/font/sfnt, which the X11 and Wayland backends draw with.

It exists because a .notdef box on screen is ambiguous. The font may lack the glyph, gg may pick the wrong subfont out of a .ttc collection, or gg may find the glyph and fail to rasterise it. Those need different fixes and two of them belong upstream, so the probe prints the glyph index each library resolves for the same rune and lets the disagreement point at the layer.

Usage:

go run ./cmd/fontprobe /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
go run ./cmd/fontprobe 'C:\Windows\Fonts\msgothic.ttc' 18

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL