Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go get fails #9

Open
tarndt opened this issue Aug 17, 2012 · 2 comments
Open

go get fails #9

tarndt opened this issue Aug 17, 2012 · 2 comments

Comments

@tarndt
Copy link

tarndt commented Aug 17, 2012

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)

@Olreich
Copy link
Contributor

Olreich commented Sep 3, 2012

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
}

@Olreich
Copy link
Contributor

Olreich commented Sep 6, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants