skelterjohn/go.uik

go get fails

tarndt opened this issue · 2 comments

go get github.com/skelterjohn/go.uik
go/src/pkg/github.com/skelterjohn/go.uik/fonts.go:34: not enough arguments in call to font.Bounds
go/src/pkg/github.com/skelterjohn/go.uik/fonts.go:35: font.UnitsPerEm undefined (type *truetype.Font has no field or method UnitsPerEm)

You have to change the go/src/pkg/github.com/skelterjohn/go.uik/fonts.go file to make it work.

Change the GetFontHeight function (line 32) like so:

func GetFontHeight(fd draw2d.FontData, size float64) (height float64) {
    font := draw2d.GetFont(fd)
    fupe := font.FUnitsPerEm()
    bounds := font.Bounds(fupe)
    height = float64(bounds.YMax-bounds.YMin) * size / float64(fupe)
    return
}

And with the freetype fixes merged in, go get -u github.com/skelterjohn/go.uik should work now.