Closed vladimirschuka closed 3 years ago
I take the time to look at this issue
@vladimirschuka No problems found on my macbook pro OS: MacOS 10.14.6 Intel i7
Can you give me the raylib c version commit you compared?
@vladimirschuka Also tested on the M1 version of the macbook air, no problem I used examples font_loading to test
Thank you. Strange, I felt that it sounds silly, I installed raylib from homebrew brew info raylib
raylib: stable 3.5.0 (bottled), HEAD
Simple and easy-to-use library to learn videogames programming
https://www.raylib.com/
/opt/homebrew/Cellar/raylib/3.5.0 (18 files, 2.8MB) *
Poured from bottle on 2021-04-25 at 23:46:22
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/raylib.rb
and commit which I used :
github.com/chunqian/go-raylib v0.0.0-20210424023010-5a21bdadf8d6
Could you please give me a hint where I should look, to fix my problem.
Thanks a lot
Can you post the full code? Or clone my project and run examples text font_loading
@vladimirschuka by the way, you shouldn't need to install raylib from homebrew. It comes with this library, so just running go get github.com/chunqian/go-raylib@master
will install it where it needs to be for Go.
go get github.com/chunqian/go-raylib@master is not the latest commit use go get -u github.com/chunqian/go-raylib The full process and full code will be more helpful
Thank you guys. I found a problem, I took example from another repository and now I understood that important 2 things, what i missed: 1)
func init() {
runtime.LockOSThread()
}
2)
font := rl.LoadFontEx("Ubuntu-Regular.ttf", 32, nil, 2048)
before it was
font := rl.LoadFontEx("Ubuntu-Regular.ttf", 32, &s, 2048)
where &s is &int32(0)
Hi I'm struggling with text output and almost gave up.
And As I see main problem is function : LoadFontEx
It works in C, I took an example about text and have such string :
Font fontTtf = LoadFontEx("Ubuntu-Regular.ttf", 256, 0, 2048);
in the log output:in Go I have such string:
font := rl.LoadFontEx("Ubuntu-Regular.ttf", 256, &s, 2048)
and in the logs :and of course there is no any output in the window of go version. And all works perfect with C version.
I'm writing here because I see project looks alive and maybe some one has solution.
OS: MacOS 11 arm64
Go: 1.16.3
go-raylib: v0.0.0-20210424023010-5a21bdadf8d6