maxp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package maxp reads and writes "maxp" tables. https://docs.microsoft.com/en-us/typography/opentype/spec/maxp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// NumGlyphs is number of glyphs in the font, in the range 1, ..., 65535.
	NumGlyphs int

	// TTF contains additional information for TrueType fonts.
	// This must be nil for CFF-based fonts.
	TTF *TTFInfo
}

Info contains information from the "maxp" table.

func Read

func Read(r io.Reader) (*Info, error)

Read reads the "maxp" table.

func (*Info) Encode

func (info *Info) Encode() []byte

Encode encodes the "maxp" table.

type TTFInfo

type TTFInfo struct {
	MaxPoints             uint16
	MaxContours           uint16
	MaxCompositePoints    uint16
	MaxCompositeContours  uint16
	MaxZones              uint16
	MaxTwilightPoints     uint16
	MaxStorage            uint16
	MaxFunctionDefs       uint16
	MaxInstructionDefs    uint16
	MaxStackElements      uint16
	MaxSizeOfInstructions uint16
	MaxComponentElements  uint16
	MaxComponentDepth     uint16
}

TTFInfo contains TrueType-specific information from the "maxp" table.

Jump to

Keyboard shortcuts

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