widths

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeComposite

func DecodeComposite(r pdf.Getter, ref pdf.Object, dw float64) (map[cid.CID]float64, error)

DecodeComposite decodes the W and DW entries of a CIDFont dictionary.

func EncodeComposite

func EncodeComposite(widths map[cid.CID]float64, v pdf.Version) (float64, pdf.Array)

EncodeComposite constructs the W and DW entries for a CIDFont dictionary.

Types

type Info

type Info struct {
	FirstChar    pdf.Integer
	LastChar     pdf.Integer
	Widths       pdf.Array
	MissingWidth float64
}

Info contains the FirstChar, LastChar and Widths entries of a PDF font dictionary, as well as the MissingWidth entry of the FontDescriptor dictionary.

func EncodeSimple

func EncodeSimple(ww []float64) *Info

EncodeSimple encodes the glyph width information for a simple PDF font. The slice ww must have length 256 and is indexed by character code. Widths values are given in PDF glyph space units.

Jump to

Keyboard shortcuts

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