textencoding

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2018 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SymbolEncoder

type SymbolEncoder struct {
}

Encoding for Symbol font.

func NewSymbolEncoder

func NewSymbolEncoder() SymbolEncoder

func (SymbolEncoder) CharcodeToGlyph

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 (SymbolEncoder) CharcodeToRune

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 (SymbolEncoder) Encode

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 (SymbolEncoder) GlyphToCharcode

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 (SymbolEncoder) GlyphToRune

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 (SymbolEncoder) RuneToCharcode

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 (SymbolEncoder) RuneToGlyph

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 (SymbolEncoder) ToPdfObject

func (enc SymbolEncoder) ToPdfObject() core.PdfObject

Convert to PDF Object.

type TextEncoder

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

type WinAnsiEncoder struct {
}

WinAnsiEncoding.

func NewWinAnsiTextEncoder

func NewWinAnsiTextEncoder() WinAnsiEncoder

func (WinAnsiEncoder) CharcodeToGlyph

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 (WinAnsiEncoder) CharcodeToRune

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 (WinAnsiEncoder) Encode

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 (WinAnsiEncoder) GlyphToCharcode

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 (WinAnsiEncoder) GlyphToRune

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 (WinAnsiEncoder) RuneToCharcode

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 (WinAnsiEncoder) RuneToGlyph

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 (WinAnsiEncoder) ToPdfObject

func (winenc WinAnsiEncoder) ToPdfObject() core.PdfObject

type ZapfDingbatsEncoder

type ZapfDingbatsEncoder struct {
}

Encoding for ZapfDingbats font.

func NewZapfDingbatsEncoder

func NewZapfDingbatsEncoder() ZapfDingbatsEncoder

func (ZapfDingbatsEncoder) CharcodeToGlyph

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 (ZapfDingbatsEncoder) CharcodeToRune

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 (ZapfDingbatsEncoder) Encode

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 (ZapfDingbatsEncoder) GlyphToCharcode

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 (ZapfDingbatsEncoder) GlyphToRune

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 (ZapfDingbatsEncoder) RuneToCharcode

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 (ZapfDingbatsEncoder) RuneToGlyph

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 (ZapfDingbatsEncoder) ToPdfObject

func (enc ZapfDingbatsEncoder) ToPdfObject() core.PdfObject

Convert to PDF Object.

Jump to

Keyboard shortcuts

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