How can I specify weight for variable font in Golang

40 Views Asked by At

I've download a ttf from Google fonts and be using it like following. It works as expected.

//go:embed NotoSansJP-VariableFont_wght.ttf
var notoSansJPData []byte

func _() {
    notoSansJP, err := opentype.Parse(notoSansJPData)
}

Then, I want to use bold one but can't find how to specify it.

0

There are 0 best solutions below