fonttest

package
v1.17.10 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fonttest makes test fonts from the fonts that the module bundles: the same outlines under another character map, so that a test can have many fonts that cover different characters, and a font whose character map cannot be read, without keeping font files in the repository.

It is for tests only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Range

func Range(from rune, n int) []rune

Range returns n runes starting at from.

Flutter: no counterpart

func Replace

func Replace(tb testing.TB, ttf []byte, tables map[string][]byte) []byte

Replace returns a copy of the TrueType font with the content of some tables replaced (by tag).

Flutter: no counterpart

func WithBrokenCmap

func WithBrokenCmap(tb testing.TB, ttf []byte) []byte

WithBrokenCmap returns a copy of the font whose cmap table is too short to be one.

Flutter: no counterpart

func WithCmap

func WithCmap(tb testing.TB, ttf []byte, runes []rune) []byte

WithCmap returns a copy of the TrueType font ttf in which the character map maps exactly the given runes (in increasing order), the i-th of them to glyph i+1 of the font. The other tables are the font's, so the copy is as large and as slow to parse as the font is.

Flutter: no counterpart

Types

This section is empty.

Jump to

Keyboard shortcuts

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