Versions in this module Expand all Collapse all v1 v1.2.0 Aug 8, 2023 v1.1.0 Aug 8, 2023 Changes in this version + const MissingCodeRune + func FromFontDifferences(diffList *core.PdfObjectArray) (map[CharCode]GlyphName, error) + func GlyphToRune(glyph GlyphName) (rune, bool) + func RegisterSimpleEncoding(name string, fnc func() SimpleEncoder) + func RuneToString(r rune) string + type CMapEncoder struct + func NewCMapEncoder(baseName string, codeToCID, cidToUnicode *cmap.CMap) CMapEncoder + func (enc CMapEncoder) CharcodeToRune(code CharCode) (rune, bool) + func (enc CMapEncoder) Decode(raw []byte) string + func (enc CMapEncoder) Encode(str string) []byte + func (enc CMapEncoder) RuneToCharcode(r rune) (CharCode, bool) + func (enc CMapEncoder) String() string + func (enc CMapEncoder) ToPdfObject() core.PdfObject + type CharCode uint16 + type GID uint16 + type GlyphName string + func RuneToGlyph(r rune) (GlyphName, bool) + type IdentityEncoder struct + func NewIdentityTextEncoder(baseName string) IdentityEncoder + func (enc IdentityEncoder) CharcodeToRune(code CharCode) (rune, bool) + func (enc IdentityEncoder) Decode(raw []byte) string + func (enc IdentityEncoder) Encode(str string) []byte + func (enc IdentityEncoder) GlyphToRune(glyph GlyphName) (rune, bool) + func (enc IdentityEncoder) RuneToCharcode(r rune) (CharCode, bool) + func (enc IdentityEncoder) RuneToGlyph(r rune) (GlyphName, bool) + func (enc IdentityEncoder) String() string + func (enc IdentityEncoder) ToPdfObject() core.PdfObject + type SimpleEncoder interface + BaseName func() string + Charcodes func() []CharCode + func ApplyDifferences(base SimpleEncoder, differences map[CharCode]GlyphName) SimpleEncoder + func NewCustomSimpleTextEncoder(encoding, differences map[CharCode]GlyphName) (SimpleEncoder, error) + func NewMacExpertEncoder() SimpleEncoder + func NewMacRomanEncoder() SimpleEncoder + func NewPdfDocEncoder() SimpleEncoder + func NewSimpleTextEncoder(baseName string, differences map[CharCode]GlyphName) (SimpleEncoder, error) + func NewStandardEncoder() SimpleEncoder + func NewSymbolEncoder() SimpleEncoder + func NewWinAnsiEncoder() SimpleEncoder + func NewZapfDingbatsEncoder() SimpleEncoder + type TextEncoder interface + CharcodeToRune func(code CharCode) (rune, bool) + Decode func(raw []byte) string + Encode func(str string) []byte + RuneToCharcode func(r rune) (CharCode, bool) + String func() string + ToPdfObject func() core.PdfObject + type TrueTypeFontEncoder struct + func NewTrueTypeFontEncoder(runeToGIDMap map[rune]GID) TrueTypeFontEncoder + func (enc TrueTypeFontEncoder) CharcodeToRune(code CharCode) (rune, bool) + func (enc TrueTypeFontEncoder) Decode(raw []byte) string + func (enc TrueTypeFontEncoder) Encode(str string) []byte + func (enc TrueTypeFontEncoder) GlyphToCharcode(glyph GlyphName) (CharCode, bool) + func (enc TrueTypeFontEncoder) RuneToCharcode(r rune) (CharCode, bool) + func (enc TrueTypeFontEncoder) String() string + func (enc TrueTypeFontEncoder) ToPdfObject() core.PdfObject + type UTF16Encoder struct + func NewUTF16TextEncoder(baseName string) UTF16Encoder + func (enc UTF16Encoder) CharcodeToRune(code CharCode) (rune, bool) + func (enc UTF16Encoder) Decode(raw []byte) string + func (enc UTF16Encoder) Encode(str string) []byte + func (enc UTF16Encoder) RuneToCharcode(r rune) (CharCode, bool) + func (enc UTF16Encoder) String() string + func (enc UTF16Encoder) ToPdfObject() core.PdfObject