Спасибо @Scheff за указание в правильном направлении.Используя найденный мной пост, связанный с тем, который они мне дали, я смог разработать две отдельные формулы - одну для выравнивания вершин глифов и одну для выравнивания дна глифов.Я решил опубликовать их здесь, чтобы помочь кому-либо еще, кто борется с этой проблемой.Вот две функции:
Выравнивание глифов по их вершинам:
TTF_Font font;
float scaleOfText;
int maxY;
int positionInput, realPositionValue; /*positionInput is where the program is told that the glyphs
should be rendered on the y-axis and realPositionValue is the position on the y-axis where the
glyphs will be rendered once they are aligned*/
char glyph;
TTF_GlyphMetrics(font, glyph, nullptr, nullptr, nullptr, &maxY, nullptr);
//Formula itself:
realPositionValue = positionInput - (TTF_FontAscent(font) * scale - (maxY * scale));
Это выглядит так: https://imgur.com/a/wtjcuSE
Выравнивание глифов по их основаниям:
TTF_Font font;
float scaleOfText;
int maxY;
int positionInput, realPositionValue; /*positionInput is where the program is told that the glyphs
should be rendered on the y-axis and realPositionValue is the position on the y-axis where the
glyphs will be rendered once they are aligned*/
char glyph;
TTF_GlyphMetrics(font, glyph, nullptr, nullptr, nullptr, &maxY, nullptr);
//Formula itself:
realPositionValue = (positionInput + maxY * scale) - ((TTF_FontAscent(font) + maxY) * scale);
Это выглядит так: https://imgur.com/a/v8RXaii
Я еще не проверял это с разными шрифтами, смешанными вместе, но я бы предположил, что это должно работать так же хорошо.Я надеюсь, что это поможет любому с проблемой, аналогичной той, с которой я столкнулся.Спасибо еще раз всем за помощь!