funit

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: GPL-3.0 Imports: 0 Imported by: 22

Documentation

Overview

Package funit contains types for representing font design units.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float64

type Float64 float64

type Int

type Int int

Int is an integer in font design units.

func (Int) AsFloat

func (x Int) AsFloat(scale float64) float64

AsFloat returns x*scale as a float64.

type Int16

type Int16 int16

Int16 is a 16-bit integer in font design units.

func (Int16) AsFloat

func (x Int16) AsFloat(scale float64) float64

AsFloat returns x*scale as a float64.

type Rect

type Rect struct {
	LLx, LLy, URx, URy Int
}

Rect represents a rectangle in font design units.

func (*Rect) Extend

func (rect *Rect) Extend(other Rect)

Extend enlarges the rectangle to also cover `other`.

func (Rect) IsZero

func (rect Rect) IsZero() bool

IsZero is true if the glyph leaves no marks on the page.

type Rect16

type Rect16 struct {
	LLx, LLy, URx, URy Int16
}

Rect16 represents a rectangle in font design units.

func (*Rect16) Extend

func (rect *Rect16) Extend(other Rect16)

Extend enlarges the rectangle to also cover `other`.

func (Rect16) IsZero

func (rect Rect16) IsZero() bool

IsZero is true if the glyph leaves no marks on the page.

Jump to

Keyboard shortcuts

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