Update Cyotek.Drawing.BitmapFont to 2.0.2 (fixes #2716)

This commit is contained in:
YoshiRulz 2021-04-28 00:51:29 +10:00
parent 31d83d0d6e
commit 6dbe73d306
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 9 additions and 8 deletions

View File

@ -8,7 +8,7 @@
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="1.3.4" />
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="2.0.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /><!-- for (extra?) dynamic type support -->
<PackageReference Include="System.Drawing.Common" Version="5.0.0" />
<ProjectReference Include="$(ProjectDir)../BizHawk.Common/BizHawk.Common.csproj" />

View File

@ -105,14 +105,15 @@ namespace BizHawk.Bizware.BizwareGL
Texture2d tex = TexturePages[bfc.TexturePage];
float w = tex.Width;
float h = tex.Height;
float u0 = bfc.Bounds.Left / w;
float v0 = bfc.Bounds.Top / h;
float u1 = bfc.Bounds.Right / w;
float v1 = bfc.Bounds.Bottom / h;
sd.Rectangle bounds = new(bfc.X, bfc.Y, bfc.Width, bfc.Height);
float u0 = bounds.Left / w;
float v0 = bounds.Top / h;
float u1 = bounds.Right / w;
float v1 = bounds.Bottom / h;
float gx = x + bfc.Offset.X;
float gy = y + bfc.Offset.Y;
renderer.DrawSubrect(tex, gx, gy, bfc.Bounds.Width, bfc.Bounds.Height, u0, v0, u1, v1);
float gx = x + bfc.XOffset;
float gy = y + bfc.YOffset;
renderer.DrawSubrect(tex, gx, gy, bfc.Width, bfc.Height, u0, v0, u1, v1);
x += bfc.XAdvance;
}