freetype icon indicating copy to clipboard operation
freetype copied to clipboard

range bug

Open Leadrive opened this issue 4 years ago • 2 comments

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/[email protected]/truetype/glyph.go:331 +0x590
github.com/golang/freetype/truetype.(*GlyphBuf).load(0x17e9590, 0x0, 0x10012, 0x0, 0x0)
	C:/gowork/pkg/mod/github.com/golang/[email protected]/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/[email protected]/truetype/glyph.go:102 +0x90
github.com/golang/freetype/truetype.(*face).GlyphAdvance(0x17e8000, 0x33, 0x33, 0x0)
	C:/gowork/pkg/mod/github.com/golang/[email protected]/truetype/face.go:345 +0x58
golang.org/x/image/font.MeasureString(0x61f42c, 0x17e8000, 0x1530da0, 0xc, 0x0)
	C:/gowork/pkg/mod/golang.org/x/[email protected]/font/font.go:301 +0x80
golang.org/x/image/font.(*Drawer).MeasureString(...)
	C:/gowork/pkg/mod/golang.org/x/[email protected]/font/font.go:215

Leadrive avatar Oct 26 '21 14:10 Leadrive

Can you attach the .ttf file?

nigeltao avatar Nov 16 '21 08:11 nigeltao

leadrive.zip ttf file. @nigeltao

Leadrive avatar Nov 18 '21 09:11 Leadrive