Loaded TTF does not draw properly on Ubuntu MATE for Raspberry Pi aarch64 #4987
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@thedmd i found out the issue was i was loading way more fonts than the raspberry pi and similar ARM devices can handle all at once apparently. on x86 PC's i never have these issues compiled using the same code. However if i reduce the amount of font files significantly i attempt to load/combine for multilingual support, the issue goes away. For example, trying to load one font file instead of hundreds of them. I have an example program added to the readme if to make testing easier, or just run the build script as-is. Either way... |
Beta Was this translation helpful? Give feedback.
-
likely happens on armhf and will test on there if anyone needs me to confirm. The same exact code displays fonts properly on OpenBSD x86-64 and macOS x86-64. My code uses OpenGL2 because OpenGL3 is not compatible. I'm using the raspberry pi 4 model b. I tried the OpenGL3 equivalent on platforms where it is compatible, including macOS x86-64 (again), Windows x86-64, Windows x86, FreeBSD x86-64, FreeBSD aarch64 (Pinebook Pro img from sleepwalker on the freebsd forum), and also ubuntu 20.04 LTS (the x86-64 GNOME edition) and Manjaro. I am using 20.04 LTS ubuntu MATE for the pi more specifically for the screenshot produced below, literally the only platform so far that doesn't render correctly with the same exact code as my other tested platforms:
Relevant OpenGL3 code here: https://github.com/time-killer-games/ImGuiFileDialog-SDL2-OpenGL3/blob/048691d423e2c520d08685e2c7228aa63f152723/filedialogs.cpp#L356-L484
And here's the OpenGL2 code i need since OpenGL3 isn't compatible but this one renders the fonts wrong on the platform mentioned:
https://github.com/time-killer-games/ImGuiFileDialog-SDL2-OpenGL2/blob/42257ae653b436d1daaa246f28b3f5889fb2032a/filedialogs.cpp#L356-L465
These are taken very directly from the example code for OpenGL 2, 3, and SDL2 in the imgui repository.
Edit: also happens on Raspberry Pi OS armhf. not sure what's making the difference.
Beta Was this translation helpful? Give feedback.
All reactions