Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Ops = map[string]func(t *CharMapperI){ "begin": func(t *CharMapperI) { a := t.St.Pop() _ = a }, "beginbfchar": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "beginbfrange": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "begincidchar": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "begincidrange": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "begincmap": func(t *CharMapperI) { }, "begincodespacerange": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "beginnotdefchar": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "beginnotdefrange": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "beginrearrangedfont": func(t *CharMapperI) { t.Args = t.St.Drop(2) t.Marker = t.St.Depth() }, "beginusematrix": func(t *CharMapperI) { t.Args = t.St.Drop(1) t.Marker = t.St.Depth() }, "currentdict": func(t *CharMapperI) { t.St.Push([]byte{'?'}) }, "def": func(t *CharMapperI) { a := t.St.Drop(2) t.Dic[string(a[0])] = a[1] }, "defineresource": func(t *CharMapperI) { a := t.St.Drop(3) t.St.Push([]byte{'?'}) _ = a }, "dict": func(t *CharMapperI) { a := t.St.Pop() t.St.Push([]byte{'?'}) _ = a }, "dup": func(t *CharMapperI) { a := t.St.Pop() t.St.Push(a) t.St.Push(a) }, "end": func(t *CharMapperI) { }, "endbfchar": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) for k := 0; k < len(a); k += 2 { t.Target.Uni.Add(ps.StrInt(ps.String(a[k])), ps.StrInt(ps.String(a[k+1]))) } }, "endbfrange": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) for k := 0; k < len(a); k += 3 { t.Target.Uni.AddRange(ps.StrInt(ps.String(a[k])), ps.StrInt(ps.String(a[k+1])), ps.StrInt(ps.String(a[k+2]))) } }, "endcidchar": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "endcidrange": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "endcmap": func(t *CharMapperI) { }, "endcodespacerange": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) for k := 0; k < len(a); k += 2 { to, l := ps.StrIntL(ps.String(a[k+1])) t.Target.Ranges.AddDef(int(a[k][0]), int(a[k+1][0])+1, l) t.Target.Ranges.AddDef(ps.StrInt(ps.String(a[k])), to+1, l) } }, "endnotdefchar": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "endnotdefrange": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "endrearrangedfont": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "endusematrix": func(t *CharMapperI) { a := t.St.Drop(t.St.Depth() - t.Marker) _ = a }, "exch": func(t *CharMapperI) { a := t.St.Drop(2) t.St.Push(a[1]) t.St.Push(a[0]) }, "findresource": func(t *CharMapperI) { a := t.St.Drop(2) t.St.Push([]byte{'?'}) _ = a }, "pop": func(t *CharMapperI) { a := t.St.Pop() _ = a }, "usecmap": func(t *CharMapperI) { a := t.St.Pop() _ = a }, "usefont": func(t *CharMapperI) { a := t.St.Pop() _ = a }, }
Functions ¶
func Decode ¶
func Decode(s []byte, to *CharMapperT) (r []byte)
Types ¶
type CharMapperI ¶
type CharMapperI struct { Target *CharMapperT St stacks.Stack Dic map[string][]byte Marker int Args [][]byte }
func NewInterpreter ¶
func NewInterpreter(t *CharMapperT) *CharMapperI
type CharMapperT ¶
func New ¶
func New() *CharMapperT
func Read ¶
func Read(rdr fancy.Reader) (r *CharMapperT)
Click to show internal directories.
Click to hide internal directories.