Skip to content

Commit

Permalink
Fix application of text baseline shift
Browse files Browse the repository at this point in the history
Baseline shift is defined in the frame of the character, so it should
rotate with the character, rather than remain relative to the screen.
  • Loading branch information
10110111 committed Dec 14, 2024
1 parent 96bd26d commit fd4d5f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/StelPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,8 @@ void StelPainter::drawText(float x, float y, const QString& str, float angleDeg,
glActiveTexture(GL_TEXTURE0);
glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTex);
tex->texture->bind(0);
x += tex->baselineShift.x();
y += tex->baselineShift.y();
xshift += tex->baselineShift.x();
yshift += tex->baselineShift.y();

static float vertexData[8];
// compute the vertex coordinates applying the translation and the rotation
Expand Down

0 comments on commit fd4d5f0

Please sign in to comment.