diff --git a/AssFontSubset/MainWindow.xaml.cs b/AssFontSubset/MainWindow.xaml.cs index 3721a17..5f0a984 100644 --- a/AssFontSubset/MainWindow.xaml.cs +++ b/AssFontSubset/MainWindow.xaml.cs @@ -390,14 +390,17 @@ private void ChangeXmlFontName(List subsetFonts) // find cid for ellipsis (\u2026) XmlNode cmap = xd.SelectSingleNode(@"//map[@code='0x2026']"); - String ellipsisCid = cmap.Attributes["name"].Value.Trim(); - XmlNodeList substitutionNodes = xd.SelectNodes($"//Substitution[@in='{ellipsisCid}']"); - - // remove substitution for lower ellipsis. - // NOTE: Vertical ellipsis is cid5xxxxx, and we need to keep it. Hopefully Adobe won't change it. - foreach (XmlNode sNode in substitutionNodes) { - if (Regex.IsMatch(sNode.Attributes["out"].Value, @"cid6")){ - sNode.ParentNode.RemoveChild(sNode); + if (cmap != null) { + String ellipsisCid = cmap.Attributes["name"].Value.Trim(); + XmlNodeList substitutionNodes = xd.SelectNodes($"//Substitution[@in='{ellipsisCid}']"); + // remove substitution for lower ellipsis. + // NOTE: Vertical ellipsis is cid5xxxxx, and we need to keep it. Hopefully Adobe won't change it. + foreach (XmlNode sNode in substitutionNodes) + { + if (Regex.IsMatch(sNode.Attributes["out"].Value, @"cid6")) + { + sNode.ParentNode.RemoveChild(sNode); + } } } } diff --git a/AssFontSubset/Properties/AssemblyInfo.cs b/AssFontSubset/Properties/AssemblyInfo.cs index e02078a..13491fe 100644 --- a/AssFontSubset/Properties/AssemblyInfo.cs +++ b/AssFontSubset/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.24.2")] -[assembly: AssemblyFileVersion("1.1.24.2")] +[assembly: AssemblyVersion("1.1.24.3")] +[assembly: AssemblyFileVersion("1.1.24.3")]