コード例 #1
0
        /// <summary>
        /// Causes the system to recognize any characters in the string, adding them to the GLFont mega texture if needed.
        /// </summary>
        /// <param name="inp">The text containing relevant characters.</param>
        public void RecognizeCharacters(string inp)
        {
            List <string> NeedsAdding = new List <string>();

            foreach (string str in SeparateEmojiAndSpecialChars(inp).Distinct())
            {
                if (!CharacterLocations.ContainsKey(str))
                {
                    NeedsAdding.Add(str);
                }
            }
            if (NeedsAdding.Count > 0)
            {
                List <string> toadd = NeedsAdding;
                while ((toadd = AddAll(toadd)) != null)
                {
                    Engine.Expand();
                }
                Engine.UpdateTexture();
            }
        }