Skip to content

Latest commit

 

History

History

mplus1p_extrabold

mplus1p_extrabold

mplus1p_extrabold

To use this font in your code, simply import it:

import (
  "github.com/gmlewis/go-fonts/fonts"
  _ "github.com/gmlewis/go-fonts/fonts/mplus1p_extrabold"
)

func main() {
  // ...
  xPos, yPos, xScale, yScale := 0.0, 0.0, 1.0, 1.0
  message := "Sample from mplus1p_extrabold"
  render, err := fonts.Text(xPos, yPos, xScale, yScale, message, "mplus1p_extrabold", &fonts.Center)
  if err != nil {
    log.Fatal(err)
  }
  log.Printf("MBB: %v", render.MBB)
  for i, poly := range render.Polygons {
    log.Printf("Polygon #%v/%v has %v points. MBB: %v", i+1, len(render.Polygons), len(poly.Pts), poly.MBB)
    // ...
  }
  // ...
}