protected internal virtual void AddRangeUni(TrueTypeFont ttf, IDictionary <int, int[]> longTag, bool includeMetrics ) { if (!subset && (subsetRanges != null || ttf.GetDirectoryOffset() > 0)) { int[] rg = subsetRanges == null && ttf.GetDirectoryOffset() > 0 ? new int[] { 0, 0xffff } : CompactRanges( subsetRanges); IDictionary <int, int[]> usemap = ttf.GetActiveCmap(); System.Diagnostics.Debug.Assert(usemap != null); foreach (KeyValuePair <int, int[]> e in usemap) { int[] v = e.Value; int gi = v[0]; if (longTag.ContainsKey(v[0])) { continue; } int c = e.Key; bool skip = true; for (int k = 0; k < rg.Length; k += 2) { if (c >= rg[k] && c <= rg[k + 1]) { skip = false; break; } } if (!skip) { longTag[gi] = includeMetrics ? new int[] { v[0], v[1], c } : null; } } } }