unidoc: github.com/unidoc/unidoc/pdf/model/textencoding Index | Files

package textencoding

import "github.com/unidoc/unidoc/pdf/model/textencoding"

Index

Package Files

encoder.go glyphs_glyphlist.go glyphs_zapfdingbats.go symbol.go utils.go winansi.go zapfdingbats.go

type SymbolEncoder Uses

type SymbolEncoder struct {
}

Encoding for Symbol font.

func NewSymbolEncoder Uses

func NewSymbolEncoder() SymbolEncoder

func (SymbolEncoder) CharcodeToGlyph Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (enc SymbolEncoder) ToPdfObject() core.PdfObject

Convert to PDF Object.

type TextEncoder Uses

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 Uses

type WinAnsiEncoder struct {
}

WinAnsiEncoding.

func NewWinAnsiTextEncoder Uses

func NewWinAnsiTextEncoder() WinAnsiEncoder

func (WinAnsiEncoder) CharcodeToGlyph Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (winenc WinAnsiEncoder) ToPdfObject() core.PdfObject

type ZapfDingbatsEncoder Uses

type ZapfDingbatsEncoder struct {
}

Encoding for ZapfDingbats font.

func NewZapfDingbatsEncoder Uses

func NewZapfDingbatsEncoder() ZapfDingbatsEncoder

func (ZapfDingbatsEncoder) CharcodeToGlyph Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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.