fontfile

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 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 fontfile reads what the backends need to register an app's font files: the family, weight and slant of each face in a TrueType, OpenType or collection file, from its name and OS/2 tables. Backends whose systems read font files themselves (CoreText, DirectWrite, fontconfig) need none of it; the web's FontFace and Android's Typeface take the family from the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Face

type Face struct {
	// Family is the face's typographic family, else its family.
	Family string
	// Weight is its OS/2 weight class, 100 to 900; 400 without one.
	Weight int
	Italic bool
}

Face is one face of a font file.

func Describe

func Describe(data []byte) ([]Face, error)

Describe returns the faces of a font file.

Jump to

Keyboard shortcuts

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