vector

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Unlicense Imports: 3 Imported by: 0

Documentation

Overview

package font converts an OpenType font into a form usable for engraving.

Index

Constants

View Source
const (
	IndexElemSize = 1 + 2 + 2

	OffSegments = offIndex + indexLen*IndexElemSize
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Face

type Face struct {
	// contains filtered or unexported fields
}

func NewFace

func NewFace(data []byte) *Face

func (*Face) Decode

func (f *Face) Decode(ch rune) (int, Segments, bool)

func (*Face) Metrics

func (f *Face) Metrics() Metrics

type Glyph

type Glyph struct {
	Advance    int8
	Start, End uint16
}

type Metrics

type Metrics struct {
	Ascent, Height int8
}

type Segment

type Segment struct {
	Op  SegmentOp
	Arg image.Point
}

Segment is like sfnt.Segment but with integer coordinates.

type SegmentOp

type SegmentOp uint32
const (
	SegmentOpMoveTo SegmentOp = iota
	SegmentOpLineTo
)

type Segments

type Segments struct {
	// contains filtered or unexported fields
}

Segments is an iterator over a glyph's segments

func (*Segments) Next

func (s *Segments) Next() (Segment, bool)

Jump to

Keyboard shortcuts

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