コード例 #1
0
		private void CreateFont(string fontName, float fontSize, CCRawList<char> charset)
		{

			_font = CCLabelUtilities.CreateFont (fontName, fontSize);

			var value = new CCLabelUtilities.ABCFloat[1];

			_abcValues.Clear();;

			for (int i = 0; i < charset.Count; i++)
			{
				var ch = charset[i];
				CCLabelUtilities.GetCharABCWidthsFloat(ch, _font, out value);
				_abcValues.Add(ch, new KerningInfo() { A = value[0].abcfA, B = value[0].abcfB, C = value[0].abcfC });
			}

		}
コード例 #2
0
        private void CreateFont(string fontName, float fontSize, CCRawList <char> charset)
        {
            _font = CCLabelUtilities.CreateFont(fontName, fontSize);

            var value = new CCLabelUtilities.ABCFloat[1];

            _abcValues.Clear();;

            for (int i = 0; i < charset.Count; i++)
            {
                var ch = charset[i];
                CCLabelUtilities.GetCharABCWidthsFloat(ch, _font, out value);
                _abcValues.Add(ch, new KerningInfo()
                {
                    A = value[0].abcfA, B = value[0].abcfB, C = value[0].abcfC
                });
            }
        }