hmtx

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: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Widths       []funit.Int16
	GlyphExtents []funit.Rect16
	LSB          []funit.Int16

	Ascent  funit.Int16
	Descent funit.Int16 // negative
	LineGap funit.Int16

	CaretAngle  float64 // in radians, 0 for vertical
	CaretOffset funit.Int16
}

Info contains information from the "hhea" and "hmtx" tables.

func Decode

func Decode(hheaData, hmtxData []byte) (*Info, error)

Decode extracts information from the "hhea" and "hmtx" tables.

func (*Info) Encode

func (info *Info) Encode() (hheaData []byte, hmtxData []byte)

Encode creates the "hhea" and "hmtx" tables.

Jump to

Keyboard shortcuts

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