Compare commits
1 Commits
Prerelease
...
master
Author | SHA1 | Date | |
---|---|---|---|
9f9191a9db |
@@ -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