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

range bug #87

Open
Leadrive opened this issue Oct 26, 2021 · 2 comments
Open

range bug #87

Leadrive opened this issue Oct 26, 2021 · 2 comments

Comments

@Leadrive
Copy link

panic: runtime error: index out of range [104] with length 104

goroutine 319 [running]:
github.com/golang/freetype/truetype.(*GlyphBuf).loadSimple(0x17e9590, 0x1583df0, 0x68, 0x75cb5, 0x1, 0x1583ce6, 0x0, 0x75dbf)
	C:/gowork/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/glyph.go:331 +0x590
github.com/golang/freetype/truetype.(*GlyphBuf).load(0x17e9590, 0x0, 0x10012, 0x0, 0x0)
	C:/gowork/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/glyph.go:229 +0x264
github.com/golang/freetype/truetype.(*GlyphBuf).Load(0x17e9590, 0x10d6100, 0x900, 0x12, 0x0, 0x0, 0xd)
	C:/gowork/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/glyph.go:102 +0x90
github.com/golang/freetype/truetype.(*face).GlyphAdvance(0x17e8000, 0x33, 0x33, 0x0)
	C:/gowork/pkg/mod/github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0/truetype/face.go:345 +0x58
golang.org/x/image/font.MeasureString(0x61f42c, 0x17e8000, 0x1530da0, 0xc, 0x0)
	C:/gowork/pkg/mod/golang.org/x/image@v0.0.0-20210607152325-775e3b0c77b9/font/font.go:301 +0x80
golang.org/x/image/font.(*Drawer).MeasureString(...)
	C:/gowork/pkg/mod/golang.org/x/image@v0.0.0-20210607152325-775e3b0c77b9/font/font.go:215
@nigeltao
Copy link
Contributor

Can you attach the .ttf file?

@Leadrive
Copy link
Author

leadrive.zip
ttf file. @nigeltao

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