d2d

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: EPL-2.0 Imports: 5 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 d2d replays gfx Pictures with Direct2D 1.1 and DirectWrite on Windows, with no window: the device is a D3D11 WARP device, so no GPU is needed and a service, CI or an SSH session in session 0 can render. It is empty on other systems.

Experimental, like gfx: the API may change without notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FaceInfo

type FaceInfo struct {
	PostScript string
	Families   []string // typographic family first, then the legacy one
	Weight     int      // 100..900
	Italic     bool
	File       string
}

FaceInfo is what a font file says about its first face: the names a Picture may use for it and the family, weight and slant DirectWrite needs to pick it.

func ReadFaceInfo

func ReadFaceInfo(path string) (FaceInfo, error)

ReadFaceInfo reads the name and OS/2 tables of an OpenType or TrueType file.

type Resolved

type Resolved struct {
	Family string
	Weight int
	Italic bool
	Custom bool // Family lives in the collection built from registered files
}

Resolved is the DirectWrite request a Picture's font name turns into.

Jump to

Keyboard shortcuts

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