classdef

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: 4 Imported by: 0

Documentation

Overview

Package classdef reads and writes OpenType "Class Definition Tables". https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#classDefTbl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table map[glyph.ID]uint16

Table contains the information from an OpenType "Class Definition Table". All glyphs not assigned to a class fall into Class 0.

func Read

func Read(p *parser.Parser, pos int64) (Table, error)

Read reads and decodes an OpenType "Class Definition Table".

func (Table) Append

func (info Table) Append(buf []byte) []byte

Append appends the binary table representation to the given buffer.

func (Table) AppendLen

func (info Table) AppendLen() int

AppendLen returns the size of the binary table representation.

func (Table) Glyphs

func (info Table) Glyphs() [][]glyph.ID

Glyphs returns the glyphs for each non-zero class in the Table. The first entry of the returned slice, corresponding to class 0, is always nil.

func (Table) NumClasses

func (info Table) NumClasses() int

NumClasses returns the number of classes in the table. The count includes the zero class.

Jump to

Keyboard shortcuts

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