/// <summary> /// Gets the language system table. /// </summary> /// <param name="script">The script tag.</param> /// <param name="langSys">The language system tag.</param> /// <param name="fontTable">The font table.</param> /// <returns>Language system table</returns> private dynamic GetLangSysTable(Tag script, Tag langSys, dynamic fontTable) { dynamic fontTableHeader = this.GetFontTableHeader(); dynamic scriptList = new AccessPrivateWrapper(fontTableHeader.GetScriptList(fontTable.Wrapped)); dynamic scriptTable = new AccessPrivateWrapper(scriptList.FindScript(fontTable.Wrapped, TagConverter.UintFromTag(script))); if (scriptTable.IsNull) { throw new ArgumentOutOfRangeException("script"); } dynamic langSysTable = langSys == null ? new AccessPrivateWrapper(scriptTable.GetDefaultLangSysTable(fontTable.Wrapped)) : new AccessPrivateWrapper(scriptTable.FindLangSys(fontTable.Wrapped, TagConverter.UintFromTag(langSys))); if (langSysTable.IsNull) { throw new ArgumentOutOfRangeException("langSys"); } return(langSysTable); }