diff --git a/lib/WellspringCS b/lib/WellspringCS index 82093d2..9d62a80 160000 --- a/lib/WellspringCS +++ b/lib/WellspringCS @@ -1 +1 @@ -Subproject commit 82093d2b0d4ee8510820213cbcd248418528a88c +Subproject commit 9d62a80dc7d5f339d5384bfb4d2954087151409c diff --git a/src/Graphics/Font/Font.cs b/src/Graphics/Font/Font.cs index eafe6d2..a38f899 100644 --- a/src/Graphics/Font/Font.cs +++ b/src/Graphics/Font/Font.cs @@ -9,6 +9,7 @@ namespace MoonWorks.Graphics.Font { public Texture Texture { get; } public float PixelsPerEm { get; } + public float DistanceRange { get; } internal IntPtr Handle { get; } @@ -39,7 +40,8 @@ namespace MoonWorks.Graphics.Font (uint) fontFileByteSpan.Length, (IntPtr) atlasFileByteBuffer, (uint) atlasFileByteSpan.Length, - out float pixelsPerEm + out float pixelsPerEm, + out float distanceRange ); var texture = Texture.FromImageFile(graphicsDevice, commandBuffer, Path.ChangeExtension(fontPath, ".png")); @@ -47,14 +49,15 @@ namespace MoonWorks.Graphics.Font NativeMemory.Free(fontFileByteBuffer); NativeMemory.Free(atlasFileByteBuffer); - return new Font(handle, texture, pixelsPerEm); + return new Font(handle, texture, pixelsPerEm, distanceRange); } - private Font(IntPtr handle, Texture texture, float pixelsPerEm) + private Font(IntPtr handle, Texture texture, float pixelsPerEm, float distanceRange) { Handle = handle; Texture = texture; PixelsPerEm = pixelsPerEm; + DistanceRange = distanceRange; StringBytesLength = 32; StringBytes = (byte*) NativeMemory.Alloc((nuint) StringBytesLength); diff --git a/src/Graphics/Font/TextBatch.cs b/src/Graphics/Font/TextBatch.cs index d9abf6a..d492626 100644 --- a/src/Graphics/Font/TextBatch.cs +++ b/src/Graphics/Font/TextBatch.cs @@ -119,6 +119,7 @@ namespace MoonWorks.Graphics.Font } NativeMemory.Free(StringBytes); + Wellspring.Wellspring_DestroyTextBatch(Handle); IsDisposed = true; }