Get the Ascender value from mod.yaml instead from the Font

This commit is contained in:
teinarss
2019-05-27 18:48:12 +02:00
committed by abcdefg30
parent a260b50ce1
commit 9982b01642
12 changed files with 81 additions and 46 deletions

View File

@@ -90,9 +90,9 @@ namespace OpenRA
if (fontSheetBuilder != null)
fontSheetBuilder.Dispose();
fontSheetBuilder = new SheetBuilder(SheetType.BGRA, 512);
Fonts = modData.Manifest.Fonts.ToDictionary(x => x.Key,
x => new SpriteFont(x.Value.First, modData.DefaultFileSystem.Open(x.Value.First).ReadAllBytes(),
x.Value.Second, Window.WindowScale, fontSheetBuilder)).AsReadOnly();
Fonts = modData.Manifest.Get<Fonts>().FontList.ToDictionary(x => x.Key,
x => new SpriteFont(x.Value.Font, modData.DefaultFileSystem.Open(x.Value.Font).ReadAllBytes(),
x.Value.Size, x.Value.Ascender, Window.WindowScale, fontSheetBuilder)).AsReadOnly();
}
Window.OnWindowScaleChanged += (before, after) =>