func FindEmbedFonts(svg []byte, dir string) ([]byte, error) {
	fonts := make(FontMap)
	re := regexp.MustCompile("font-family:(.*?);")
	matches := re.FindAllStringSubmatch(string(svg), -1)
	for _, match := range matches {
		name := strings.Trim(match[1], " '\"\t\n\r")
		if (name == "sans-serif") || (name == "serif") {
			continue
		}
		fonts[name] = Font{Family: name}
	}
	if len(os.Args) > 2 {
		err := ProcessCmdLineFonts(fonts, os.Args[2:], dir)
		if err != nil {
			return svg, fmt.Errorf("Error processing command line font: %s", err)
		}
	}
	if CheckAllFontsSet(fonts) {
		svgEmbed, err := Embed(fonts, svg)
		if err != nil {
			return svg, err
		}
		PrintResults(fonts)
		return svgEmbed, nil
	}
	if err := Walk(fonts, dir); err != nil {
		return svg, err
	}
	if !CheckAllFontsSet(fonts) {
		for family, f := range fonts {
			if len(f.EncodedFont) == 0 {
				return svg, fmt.Errorf("No matching font file found for font-family: %s", family)
			}
		}
	}
	svgEmbed, err := Embed(fonts, svg)
	if err != nil {
		return svg, err
	}
	PrintResults(fonts)
	return svgEmbed, nil
}
FindEmbedFonts will analyze the SVG file looking for all unique fonts used.  It will then walk the directory tree
starting from the working directory looking for fonts that match the font-family names.  It will then Base64 encode
the font and embed it in the SVG file.
package main
import (
	"bytes"
	"encoding/base64"
	"fmt"
	"html/template"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"regexp"
	"strings"
)
type Font struct {
	Family string
	CmdLineSet  bool
	EncodedFont string
	File        string
}
type Document struct {
	Fonts []Font
}
func (d *Document) Add(f Font) {
	d.Fonts = append(d.Fonts, f)
	return
}
type FontMap map[string]Font