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

Method FontFace

font/font.go:107–116  ·  view source on GitHub ↗

FontFace returns the opentype font face for the requested dots-per-inch resolution.

(dpi float64)

Source from the content-addressed store, hash-verified

105// FontFace returns the opentype font face for the requested
106// dots-per-inch resolution.
107func (f *Face) FontFace(dpi float64) font.Face {
108 face, err := opentype.NewFace(f.Face, &opentype.FaceOptions{
109 Size: f.Font.Size.Points(),
110 DPI: dpi,
111 })
112 if err != nil {
113 panic(err)
114 }
115 return face
116}
117
118// default hinting for OpenType fonts
119const defaultHinting = font.HintingNone

Callers 1

FillStringMethod · 0.80

Calls 1

PointsMethod · 0.80

Tested by

no test coverage detected