github.com/gop9/olt@v0.0.0-20200202132135-d956aad50b08/framework/font/font.go (about)

     1  package font
     2  
     3  import (
     4  	"github.com/gop9/fonts/bariol/bariolregular"
     5  )
     6  
     7  // Returns default font (bariolregular) with specified size and scaling
     8  func DefaultFont(size int, scaling float64) Face {
     9  	face, err := NewFace(bariolregular.TTF, int(float64(size)*scaling))
    10  	if err != nil {
    11  		panic(err)
    12  	}
    13  	return face
    14  }