import "github.com/unidoc/unidoc/pdf/model/textencoding"
encoder.go glyphs_glyphlist.go glyphs_zapfdingbats.go symbol.go utils.go winansi.go zapfdingbats.go
type SymbolEncoder struct { }
Encoding for Symbol font.
func NewSymbolEncoder() SymbolEncoder
func (enc SymbolEncoder) CharcodeToGlyph(code byte) (string, bool)
Conversion between character code and glyph name. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) CharcodeToRune(charcode byte) (rune, bool)
Convert character code to rune. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) Encode(raw string) string
Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF.
func (enc SymbolEncoder) GlyphToCharcode(glyph string) (byte, bool)
Conversion between glyph name and character code. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) GlyphToRune(glyph string) (rune, bool)
Convert glyph to rune. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) RuneToCharcode(val rune) (byte, bool)
Convert rune to character code. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) RuneToGlyph(val rune) (string, bool)
Convert rune to glyph name. The bool return flag is true if there was a match, and false otherwise.
func (enc SymbolEncoder) ToPdfObject() core.PdfObject
Convert to PDF Object.
type TextEncoder interface { // Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF. Encode(raw string) string // Conversion between character code and glyph name. // The bool return flag is true if there was a match, and false otherwise. CharcodeToGlyph(code byte) (string, bool) // Conversion between glyph name and character code. // The bool return flag is true if there was a match, and false otherwise. GlyphToCharcode(glyph string) (byte, bool) // Convert rune to character code. // The bool return flag is true if there was a match, and false otherwise. RuneToCharcode(val rune) (byte, bool) // Convert character code to rune. // The bool return flag is true if there was a match, and false otherwise. CharcodeToRune(charcode byte) (rune, bool) // Convert rune to glyph name. // The bool return flag is true if there was a match, and false otherwise. RuneToGlyph(val rune) (string, bool) // Convert glyph to rune. // The bool return flag is true if there was a match, and false otherwise. GlyphToRune(glyph string) (rune, bool) ToPdfObject() core.PdfObject }
type WinAnsiEncoder struct { }
WinAnsiEncoding.
func NewWinAnsiTextEncoder() WinAnsiEncoder
func (winenc WinAnsiEncoder) CharcodeToGlyph(code byte) (string, bool)
Conversion between character code and glyph name. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) CharcodeToRune(charcode byte) (rune, bool)
Convert character code to rune. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) Encode(raw string) string
Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF.
func (winenc WinAnsiEncoder) GlyphToCharcode(glyph string) (byte, bool)
Conversion between glyph name and character code. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) GlyphToRune(glyph string) (rune, bool)
Convert glyph to rune. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) RuneToCharcode(val rune) (byte, bool)
Convert rune to character code. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) RuneToGlyph(val rune) (string, bool)
Convert rune to glyph name. The bool return flag is true if there was a match, and false otherwise.
func (winenc WinAnsiEncoder) ToPdfObject() core.PdfObject
type ZapfDingbatsEncoder struct { }
Encoding for ZapfDingbats font.
func NewZapfDingbatsEncoder() ZapfDingbatsEncoder
func (enc ZapfDingbatsEncoder) CharcodeToGlyph(code byte) (string, bool)
Conversion between character code and glyph name. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) CharcodeToRune(charcode byte) (rune, bool)
Convert character code to rune. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) Encode(raw string) string
Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF.
func (enc ZapfDingbatsEncoder) GlyphToCharcode(glyph string) (byte, bool)
Conversion between glyph name and character code. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) GlyphToRune(glyph string) (rune, bool)
Convert glyph to rune. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) RuneToCharcode(val rune) (byte, bool)
Convert rune to character code. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) RuneToGlyph(val rune) (string, bool)
Convert rune to glyph name. The bool return flag is true if there was a match, and false otherwise.
func (enc ZapfDingbatsEncoder) ToPdfObject() core.PdfObject
Convert to PDF Object.
Package textencoding imports 2 packages (graph) and is imported by 7 packages. Updated 2017-08-02. Refresh now. Tools for package owners.