Ejemplo n.º 1
0
        public int GetCharRange(IReadOnlyList <CharacterRange> ranges)
        {
            for (var i = 0; i <= CharacterRanges.Count - ranges.Count; i++)
            {
                if (RangeMatchesRange(i, ranges))
                {
                    return(i);
                }
            }

            var result = CharacterRanges.Count;

            CharacterRanges.AddRange(ranges.Select(range => new CharRange(range.Min, range.Max)));

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Add the given character ranges to this <see cref="FontAtlasEntry"/>.
 /// Ranges are merged when they overlap.
 /// </summary>
 /// <param name="ranges">The character ranges to add.</param>
 public void AddCharacterRanges(IEnumerable <Range <int> > ranges)
 {
     CharacterRanges.AddRange(ranges);
     NormalizeCharacterRanges();
 }