MCPcopy Create free account
hub / github.com/cogentcore/core / OpenAllFonts

Method OpenAllFonts

paint/fontlib.go:201–207  ·  view source on GitHub ↗

OpenAllFonts attempts to load all fonts that were found -- call this before displaying the font chooser to eliminate any bad fonts.

(size int)

Source from the content-addressed store, hash-verified

199// OpenAllFonts attempts to load all fonts that were found -- call this before
200// displaying the font chooser to eliminate any bad fonts.
201func (fl *FontLib) OpenAllFonts(size int) {
202 sz := len(fl.FontInfo)
203 for i := sz - 1; i > 0; i-- {
204 fi := fl.FontInfo[i]
205 fl.Font(strings.ToLower(fi.Name), size)
206 }
207}
208
209// InitFontPaths initializes font paths to system defaults, only if no paths
210// have yet been set

Callers

nothing calls this directly

Calls 1

FontMethod · 0.95

Tested by

no test coverage detected