Skip to content

Commit

Permalink
fix incorrect sign on TextStringInstance y origin
Browse files Browse the repository at this point in the history
  • Loading branch information
DonutVikingChap committed Oct 8, 2023
1 parent f71806e commit 0042f81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphics/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void Renderer::render(Framebuffer& framebuffer, const RenderPass& renderPass, co
text.reshape(*boundFont, command.characterSize, command.string, command.position, command.scale);
const vec2 position{
round((text.getMinExtent().x - text.getMaxExtent().x) * command.origin.x),
round(boundFont->getLineMetrics(command.characterSize).ascender * command.scale.y * command.origin.y),
round(-boundFont->getLineMetrics(command.characterSize).ascender * command.scale.y * command.origin.y),
};
for (const Text::ShapedGlyph& shapedGlyph : text.getShapedGlyphs()) {
pushGlyphInstance(position, shapedGlyph, boundTexture->getSize2D(), command.color);
Expand Down

0 comments on commit 0042f81

Please sign in to comment.