gdef

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: 5 Imported by: 1

Documentation

Overview

Package gdef reads and writes OpenType "GDEF" tables.

Index

Constants

View Source
const (
	GlyphClassBase      = 1
	GlyphClassLigature  = 2
	GlyphClassMark      = 3
	GlyphClassComponent = 4
)

Possible values for the GlyphClass field. https://docs.microsoft.com/en-us/typography/opentype/spec/GDEF#glyph-class-definition-table

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	GlyphClass classdef.Table // class definition table for glyph type
	// TODO(voss): attachment point list table
	// TODO(voss): ligature caret list table
	MarkAttachClass classdef.Table // class definition table for mark attachment type
	MarkGlyphSets   []coverage.Set // table of mark glyph set definitions

}

Table contains the parsed GDEF table. https://docs.microsoft.com/en-us/typography/opentype/spec/GDEF

func Read

func Read(r parser.ReadSeekSizer) (*Table, error)

Read reads the GDEF table.

func (*Table) Encode

func (table *Table) Encode() []byte

Encode converts the GDEF table to its binary form.

func (*Table) IsMark

func (table *Table) IsMark(gid glyph.ID) bool

IsMark returns true if it is known that the glyph represents a mark character.

Jump to

Keyboard shortcuts

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