Skip to content

Commit

Permalink
fix(GlyphRenderer): 文字のバウンディングボックス計算が間違っていたのを修正し、正しくレンダリングされるように
Browse files Browse the repository at this point in the history
  • Loading branch information
EbiseLutica committed Jun 6, 2024
1 parent 348a612 commit 5b2d0ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Promete/Graphics/GlyphRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Texture2D Generate(string text, Font font, SDColor? color, SDColor? borde
private Rect GetTextBounds(string text, SixLabors.Fonts.Font font)
{
var size = TextMeasurer.MeasureBounds(text, new TextOptions(font));
return new Rect(0, 0, (int)size.Width, (int)size.Height);
return new Rect(0, 0, (int)size.Right, (int)size.Bottom);
}

private SixLabors.Fonts.Font ResolveFont(Font f)
Expand Down

0 comments on commit 5b2d0ed

Please sign in to comment.