practical-tools-for-simple-design
practical-tools-for-simple-design copied to clipboard
Some font can't have more then one text.
Problem
Same As Title, i think it is AssetStore Bug. but I don't know why Inter font can work well
Steps to reproduce
- Clone commit 823926c(main branch)
- Add NotoSans-Regular font Download From Google Fonts
- Change App::Start implementation to
void App::Start() {
LOG_TRACE("Start");
m_Giraffe->SetDrawable(
std::make_shared<Util::Image>("../assets/sprites/giraffe.png"));
m_Giraffe->SetZIndex(5);
m_Giraffe->Start();
auto textTest = std::make_shared<Util::GameObject>();
textTest->SetDrawable(std::make_shared<Util::Text>(
"../assets/fonts/NotoSans-Regular.ttf", 50, "1000",
Util::Color::FromRGB(255, 255, 255)));
auto textTest1 = std::make_shared<Util::GameObject>();
textTest1->SetDrawable(std::make_shared<Util::Text>(
"../assets/fonts/NotoSans-Regular.ttf", 50, "2222",
Util::Color::FromRGB(255, 255, 255)));
m_Root.AddChild(m_Giraffe);
m_Root.AddChild(m_Cat);
m_Root.AddChild(textTest);
m_Root.AddChild(textTest1);
m_CurrentState = State::UPDATE;
}
- That only show the 1000 Text(The first create Text).
Expected behavior
show 1000 and 2222 text.
PTSD version
main commit 823926c952ddbd068dc74909bf0663a00573d248
Operating system/version
ubuntu 22.04.3
CMake version
3.28.3
CMakeCache.txt
OpenGL Info
[info] OpenGL Info
[info] Vendor: NVIDIA Corporation
[info] Renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
[info] Version: 4.1.0 NVIDIA 535.161.07
[info] GLSL Version: 4.10 NVIDIA via Cg compiler
I can reproduce this issue on my machine, however I can't find the root cause of this
I've tried Reddit Mono from Google Fonts and it has the same issue
I think I will remove the store from Util::Text
for now but I will leave this open