Skip to content

Commit

Permalink
Add alignment-baseline:central logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sammycage committed Dec 21, 2024
1 parent dab9e11 commit 3dbfd32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/svgtextelement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static float calculateBaselineOffset(const SVGTextPositioningElement* element)
offset -= font.xHeight() / 2.f;
break;
case AlignmentBaseline::Central:
offset -= (font.ascent() - font.descent()) / 2.f;
offset -= (font.ascent() + font.descent()) / 2.f;
break;
case AlignmentBaseline::AfterEdge:
case AlignmentBaseline::TextAfterEdge:
Expand Down

0 comments on commit 3dbfd32

Please sign in to comment.