Beispiel #1
0
func utf8(s *string) {
	//
	for i := len(*s) - 1; i >= 0; i-- {
		c := (*s)[i]
		if z.IsLatin1(c) {
			*s = (*s)[:i] + string(c) + (*s)[i+1:]
		}
	}
}
Beispiel #2
0
func (x *Imp) Write (s string, x0, y0 float64) {
//
  x.newpath ()
  x.moveto (x0, y0)
  for i:= 0; i < len (s); i++ {
    if z.IsLatin1 (s[i]) {
      x.write ("/" + z.Postscript (s[i]) + " glyphshow\n")
    } else {
      x.write ("(" + string(s[i]) + ") show\n")
    }
  }
  x.stroke ()
}
Beispiel #3
0
func (x *Imp) Edit(l, c uint) {
	//
	b := x.symbol
	scr.Colours(x.cF, x.cB)
	scr.Write1(b, l, c)
loop:
	for {
		scr.Warp(l, c, scr.Understroke)
		b = kbd.Byte()
		switch {
		case ' ' <= b, b < 128, z.IsLatin1(b):
			break loop
		}
	}
	scr.Write1(b, l, c)
	x.symbol = b
}