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

gltext.LoadTruetype get me "GL error: 1282", Please help! #25

Open
SolindekDev opened this issue Jul 21, 2022 · 0 comments
Open

gltext.LoadTruetype get me "GL error: 1282", Please help! #25

SolindekDev opened this issue Jul 21, 2022 · 0 comments

Comments

@SolindekDev
Copy link

Hi im using gltext in my little project and i have a errorwhile loading font from "./font/Roboto-Light.ttf" i getting GL error 1282 i can't fix it

	fd, err := os.Open(file)
	if err != nil {
		return nil, err
	}
	defer fd.Close()

	return gltext.LoadTruetype(fd, scale, 32, 127, gltext.LeftToRight)
}```

```func initFonts() {
	var err error
	for i := range fonts {
		fmt.Printf("[%d] [LOADING] Loading font of scale %d\n", i, int32(12+i))
		fonts[i], err = loadFont("./font/Roboto-Light.ttf", int32(12+i))
		if err != nil {
			log.Printf("failed while init fonts: %v", err)
			return
		}
		defer fonts[i].Release()
		fmt.Printf("[%d] [OK] successfully loaded font of scale %d\n", i, int32(12+i))
	}
}```
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

1 participant