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.
I do not know why the commenter did not answer, but @Adrian is right. The golang package golang.org/x/image/font/opentype does not support Variable Font files, and, in my opinion as someone who works in this area, it is unlikely to be extended to support them. Google should also supply non-variable "instanced" files, which are the Variable Font instanced to each weight it supports (or whatever the axis is).
Use those instead.