static DefaultTexFont() { var parser = new DefaultTexFontParser(); parameters = parser.GetParameters(); generalSettings = parser.GetGeneralSettings(); textStyleMappings = parser.GetTextStyleMappings(); defaultTextStyleMappings = parser.GetDefaultTextStyleMappings(); symbolMappings = parser.GetSymbolMappings(); fontInfoList = parser.GetFontDescriptions(); // Check that Mu font exists. var muFontId = (int)generalSettings["mufontid"]; if (muFontId < 0 || muFontId >= fontInfoList.Count || fontInfoList[muFontId] == null) throw new InvalidOperationException("ID of Mu font is invalid."); }
static DefaultTexFont() { var parser = new DefaultTexFontParser(); parameters = parser.GetParameters(); generalSettings = parser.GetGeneralSettings(); textStyleMappings = parser.GetTextStyleMappings(); defaultTextStyleMappings = parser.GetDefaultTextStyleMappings(); symbolMappings = parser.GetSymbolMappings(); fontInfoList = parser.GetFontDescriptions(); // Check that Mu font exists. var muFontId = (int)generalSettings["mufontid"]; if (muFontId < 0 || muFontId >= fontInfoList.Count || fontInfoList[muFontId] == null) { throw new InvalidOperationException("ID of Mu font is invalid."); } }