func (c *Canvas) EmbedFonts(v bool) bool {
	prev := c.embed
	c.embed = v
	return prev
}
EmbedFonts specifies whether the resulting PDF canvas should
embed the fonts or not.
EmbedFonts returns the previous value before modification.
package vgpdf  
import (
	"bufio"
	"bytes"
	"fmt"
	"image"
	"image/color"
	"image/png"
	"io"
	"io/ioutil"
	"log"
	"math"
	"os"
	"path/filepath"
	pdf "github.com/jung-kurt/gofpdf"
	"gonum.org/v1/plot/vg"
	"gonum.org/v1/plot/vg/fonts"
)
const DPI = 72
type Canvas struct {
	doc  *pdf.Fpdf
	w, h vg.Length
	dpi       int
	numImages int
	stack     []context
	fonts     map[vg.Font]struct{}
	embed bool
}
type context struct {
	fill  color.Color
	line  color.Color
	width vg.Length
}
func New(w, h vg.Length) *Canvas {
	cfg := pdf.InitType{
		UnitStr: "pt",
		Size:    pdf.SizeType{Wd: w.Points(), Ht: h.Points()},
	}
	c := &Canvas{
		doc:   pdf.NewCustom(&cfg),
		w:     w,
		h:     h,
		dpi:   DPI,
		stack: make([]context, 1),
		fonts: make(map[vg.Font]struct{}),
		embed: true,
	}
	c.NextPage()
	vg.Initialize(c)
	return c
}