Temp patch for text size bounds. Needs to be fixed properly.
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m13s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m13s
This commit is contained in:
@@ -112,7 +112,11 @@ namespace JGL {
|
||||
Vector2 extents = Vector2::Zero;
|
||||
|
||||
for(auto& f : fontCache.getFonts()) {
|
||||
if (f->getFontIndex() == this->index) {
|
||||
// This edit technically "works" by solving the immediate problem of text-bounds returning incorrectly,
|
||||
// But I am **sure** this is not how it should be implemented, I will leave that to Will to fix.
|
||||
|
||||
if (f->getFontIndex() == this->index && f->getFontSize() == ptSize) {
|
||||
|
||||
for (const char &c: text) {
|
||||
auto glyph = f->getGlyph(c);
|
||||
extents.x += glyph->advanceX;
|
||||
|
Reference in New Issue
Block a user