diff --git a/src/SlatedGameToolkit.Framework/Graphics/Text/BitmapFont.cs b/src/SlatedGameToolkit.Framework/Graphics/Text/BitmapFont.cs index f87d3b9..7c961f4 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Text/BitmapFont.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Text/BitmapFont.cs @@ -62,7 +62,6 @@ namespace SlatedGameToolkit.Framework.Graphics.Text for (int i = 0; i < this.textures.Length; i++) { this.textures[i] = new FontTexture(info, context, glyphIndices, textureSizes); } - PixelHeight = 64; int spaceAdvance, leftSideBearing; StbTrueType.stbtt_GetCodepointHMetrics(info, ' ', &spaceAdvance, &leftSideBearing); this.spaceAdvance = spaceAdvance; @@ -76,6 +75,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Text context.GetViewport(out vX, out vY, out vWidth, out vHeight); this.PixelsPerUnitWidth = vWidth; this.PixelsPerUnitHeight = vHeight; + PixelHeight = 64; } public BitmapFont(string path, GLContext glContext = null, int cacheSize = 1024, int textures = 2, uint textureSizes = 512) : this(File.ReadAllBytes(path), glContext, cacheSize, textures, textureSizes) {