1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-21 20:43:29 +01:00

only leave generic font test comparison wiggle room for KNI, and make it 10%

This commit is contained in:
Ell 2024-10-26 14:54:43 +02:00
parent f5e64eb719
commit 78d73c2417

View file

@ -124,8 +124,12 @@ public class FontTests : GameTestFixture {
var spriteFont = ((GenericSpriteFont) this.Font).Font.MeasureString(s);
var genericFont = this.Font.MeasureString(s);
Assert.AreEqual(spriteFont.X, genericFont.X);
// we leave a bit of room for the Y value since sprite fonts sometimes increase line height for specific characters, which generic fonts don't
Assert.AreEqual(spriteFont.Y, genericFont.Y, 10);
Assert.AreEqual(spriteFont.Y, genericFont.Y
#if KNI
// we leave a bit of room for the Y value since KNI's sprite fonts sometimes increase line height for specific characters, which generic fonts don't
, spriteFont.Y / 10
#endif
);
}
CompareSizes("This is a very simple test string");