cmap

package
v3.0.0-...-55e877b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MissingCodeRune   = '\ufffd'
	MissingCodeString = string(MissingCodeRune)
)

Variables

View Source
var (
	ErrBadCMap        = _b.New("\u0062\u0061\u0064\u0020\u0063\u006d\u0061\u0070")
	ErrBadCMapComment = _b.New("c\u006f\u006d\u006d\u0065\u006e\u0074 \u0073\u0068\u006f\u0075\u006c\u0064\u0020\u0073\u0074a\u0072\u0074\u0020w\u0069t\u0068\u0020\u0025")
	ErrBadCMapDict    = _b.New("\u0069\u006e\u0076a\u006c\u0069\u0064\u0020\u0064\u0069\u0063\u0074")
)

Functions

func IsPredefinedCMap

func IsPredefinedCMap(name string) bool

Types

type CIDSystemInfo

type CIDSystemInfo struct {
	Registry   string
	Ordering   string
	Supplement int
}

func NewCIDSystemInfo

func NewCIDSystemInfo(obj _fb.PdfObject) (_cg CIDSystemInfo, _cgg error)

func (*CIDSystemInfo) String

func (_fg *CIDSystemInfo) String() string

type CMap

type CMap struct {
	// contains filtered or unexported fields
}

func LoadCmapFromData

func LoadCmapFromData(data []byte, isSimple bool) (*CMap, error)

func LoadCmapFromDataCID

func LoadCmapFromDataCID(data []byte) (*CMap, error)

func LoadPredefinedCMap

func LoadPredefinedCMap(name string) (*CMap, error)

func NewToUnicodeCMap

func NewToUnicodeCMap(codeToRune map[CharCode]rune) *CMap

func (*CMap) Bytes

func (cmap *CMap) Bytes() []byte

func (*CMap) BytesToCharcodes

func (cmap *CMap) BytesToCharcodes(data []byte) ([]CharCode, bool)

func (*CMap) CIDSystemInfo

func (cmap *CMap) CIDSystemInfo() CIDSystemInfo

func (*CMap) CIDToCharcode

func (cmap *CMap) CIDToCharcode(cid CharCode) (CharCode, bool)

func (*CMap) CharcodeBytesToUnicode

func (cmap *CMap) CharcodeBytesToUnicode(data []byte) (string, int)

func (*CMap) CharcodeToCID

func (cmap *CMap) CharcodeToCID(code CharCode) (CharCode, bool)

func (*CMap) CharcodeToUnicode

func (cmap *CMap) CharcodeToUnicode(code CharCode) (string, bool)

func (*CMap) NBits

func (cmap *CMap) NBits() int

func (*CMap) Name

func (cmap *CMap) Name() string

func (*CMap) Stream

func (cmap *CMap) Stream() (*_fb.PdfObjectStream, error)

func (*CMap) String

func (cmap *CMap) String() string

func (*CMap) StringToCID

func (cmap *CMap) StringToCID(s string) (CharCode, bool)

func (*CMap) Type

func (cmap *CMap) Type() int

func (*CMap) WMode

func (cmap *CMap) WMode() (int, bool)

type CharCode

type CharCode uint32

type Codespace

type Codespace struct {
	NumBytes int
	Low      CharCode
	High     CharCode
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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