MCPcopy Index your code
hub / github.com/gonum/plot / NewCache

Function NewCache

font/font.go:213–219  ·  view source on GitHub ↗

NewCache creates a new cache of fonts from the provided collection of font Faces. The first font Face in the collection is set to be the default one.

(coll Collection)

Source from the content-addressed store, hash-verified

211// font Faces.
212// The first font Face in the collection is set to be the default one.
213func NewCache(coll Collection) *Cache {
214 cache := &Cache{
215 faces: make(map[Font]*opentype.Font, len(coll)),
216 }
217 cache.Add(coll)
218 return cache
219}
220
221// Add adds a whole collection of font Faces to the font cache.
222// If the cache is empty, the first font Face in the collection is set

Callers 9

TestFontExtendsFunction · 0.92
TestFontWidthFunction · 0.92
TestFontKernFunction · 0.92
vgimg_test.goFile · 0.92
ReplayOnMethod · 0.92
TestPlainTextFunction · 0.92
ExampleLatexFunction · 0.92
TestLatexTextFunction · 0.92
font.goFile · 0.85

Calls 1

AddMethod · 0.95

Tested by 6

TestFontExtendsFunction · 0.74
TestFontWidthFunction · 0.74
TestFontKernFunction · 0.74
TestPlainTextFunction · 0.74
ExampleLatexFunction · 0.74
TestLatexTextFunction · 0.74