unipdf/internal/cmap/const.go
Adrian-George Bostan e2b3c6e6ba
Add predefined CMaps for Type 0 composite fonts (#246)
* Add packed predefined cmaps
* Add cmap cid range parsing
* Load base cmap for predefined cmaps
* Refactor pdfFont to Unicode methods
* Preserve CharcodeBytesToUnicode behavior
* Add support for CID-keyed Type 0 fonts
* Add method documentation for the cmap package
* Refactor and document charcode to Unicode conversion code
* Add more cmap parsing test cases
* Add more method documentation in the cmap package.
* Remove unused code from the bcmaps package
* Improve cmap test case
* Assume identity when encoder is missing on regenerating field appearance
* Add missing encoder log message
* Add inverse CMap mappings
* Add CMap encoder
* Address golint notices and small fix in the cmap package
* Keep smaller charcodes when generating cmap inverse mappings
* Update extractor test case
* Keep latest supplement charcodes/CIDs when computing inverse mappings
* Fix comment typo
2020-02-07 19:56:30 +00:00

37 lines
901 B
Go

/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package cmap
import (
"errors"
)
// CMap parser errors.
var (
ErrBadCMap = errors.New("bad cmap")
ErrBadCMapComment = errors.New("comment should start with %")
ErrBadCMapDict = errors.New("invalid dict")
)
const (
cidSystemInfo = "CIDSystemInfo"
begincmap = "begincmap"
endcmap = "endcmap"
begincodespacerange = "begincodespacerange"
endcodespacerange = "endcodespacerange"
beginbfchar = "beginbfchar"
endbfchar = "endbfchar"
beginbfrange = "beginbfrange"
endbfrange = "endbfrange"
begincidrange = "begincidrange"
endcidrange = "endcidrange"
usecmap = "usecmap"
cmapname = "CMapName"
cmaptype = "CMapType"
cmapversion = "CMapVersion"
)