small tweak to font height calc
This commit is contained in:
parent
3ef4692b23
commit
cd6b961a3b
|
@ -1899,11 +1899,7 @@ Vec2f Renderer::getCentered3DPos(const string &text, Font3D *font, Vec2f &pos, i
|
|||
else {
|
||||
pos.y += (float)(((float)h) / 2.0);
|
||||
float heightGap = (float)(((float)h - lineHeight) / 2.0);
|
||||
#ifdef USE_STREFLOP
|
||||
pos.y -= streflop::ceil(heightGap);
|
||||
#else
|
||||
pos.y -= ceil(heightGap);
|
||||
#endif
|
||||
pos.y -= heightGap;
|
||||
|
||||
//printf("h = %d lineHeight = %f heightGap = %f\n",h,lineHeight,heightGap);
|
||||
|
||||
|
|
|
@ -224,7 +224,8 @@ float TextFreetypeGL::LineHeight(const char* str, const int len) {
|
|||
|
||||
float result = 0;
|
||||
|
||||
result = font->height - font->linegap;
|
||||
//result = font->height - font->linegap;
|
||||
result = font->ascender - font->descender - font->linegap;
|
||||
//printf("#2 LineHeight [%s] height = %f linegap = %f ascender = %f descender = %f\n",str,font->height,font->linegap,font->ascender,font->descender);
|
||||
|
||||
//result += (result * Font::scaleFontValue);
|
||||
|
|
Loading…
Reference in New Issue
Block a user